-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
executable file
·65 lines (56 loc) · 1.35 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
SHELL=/bin/bash
CPP = g++-10
CCFLAGS = -O3 -pedantic -Wall -Wextra -std=c++1z
CCLINK = -I/usr/local/include -L/usr/local/lib -lexiv2
CCNAME = -o mediarizer
ifeq ($(OS), Windows_NT)
CCFLAGS += -D WIN32 -fopenmp
ifeq ($(PROCESSOR_ARCHITEW6432),AMD64)
CCFLAGS += -D AMD64
else
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64)
CCFLAGS += -D AMD64
endif
ifeq ($(PROCESSOR_ARCHITECTURE),x86)
CCFLAGS += -D IA32
endif
endif
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S), Linux)
CCFLAGS += -D LINUX -fopenmp
endif
ifeq ($(UNAME_S), Darwin)
CCFLAGS += -D OSX -Xclang -fopenmp
CCLINK += -lomp
endif
UNAME_P := $(shell uname -p)
ifeq ($(UNAME_P), x86_64)
CCFLAGS += -D AMD64
endif
ifneq ($(filter %86,$(UNAME_P)),)
CCFLAGS += -D IA32
endif
ifneq ($(filter arm%,$(UNAME_P)),)
CCFLAGS += -D ARM
endif
endif
MDRZ = -I mediarizer_hdr
OBJ_MAIN = src/mediarizer.o
OBJ_MDRZ = src/mediarizer_src/meta_processor.o \
src/mediarizer_src/string_processor.o \
src/mediarizer_src/file_processor.o
HDR_MDRZ = src/mediarizer_hdr/processor.h
all: organizer
organizer: $(OBJ_MAIN) $(OBJ_MDRZ)
$(CPP) $(CCFLAGS) $(CCNAME) \
$(OBJ_MAIN) $(OBJ_MDRZ) \
$(CCLINK)
test:
mkdir .output
./mediarizer -i img -o .output -D -r -p
rm -rf .output
clean:
rm -f mediarizer src/*.o src/mediarizer_src/*.o
%.o: %.cpp $(HDR_MDRZ)
$(CPP) $(CCFLAGS) $(MDRZ) -o $@ -c $<