1 | # -------------------- # |
---|
2 | # -- Label Makefile -- # |
---|
3 | # -------------------- # |
---|
4 | |
---|
5 | # Copyright (c) 2008-2008 Lionel Lacassagne |
---|
6 | # with a little help of Stephane Piskorski and Joel Falcou |
---|
7 | |
---|
8 | # -- Lile list ---------- |
---|
9 | FILE_ECC = ecc_common.c ecc_features.c ecc_generation.c ecc_lsl.c |
---|
10 | |
---|
11 | FILE_ECC_ALGO = ecc_grana.c ecc_hcs.c ecc_hcs2.c ecc_minmax.c ecc_mpar32.c ecc_rcm.c ecc_rosenfeld.c ecc_selkow.c ecc_suzuki.c |
---|
12 | FILE_ECCX_ALGO = eccx_grana.c eccx_hcs2.c eccx_mpar32.c eccx_rem.c eccx_rosenfeld.c eccx_selkow.c eccx_suzuki.c |
---|
13 | FILE_ECCP_ALGO = eccp_grana.c eccp_hcs.c eccp_hcs2.c eccp_rcm.c eccp_rosenfeld.c eccp_suzuki.c |
---|
14 | |
---|
15 | FILE_LSL = lsl.c lsl32.c lsl32_par.c lsl32_par1.c lsl32_par2.c |
---|
16 | #FILE_REGION = region32.c region32_algo.c region32_par1.c region32_par2.c region32_par_features.c region32_rosenfeld.c |
---|
17 | FILE_REGION = region32_par1.c region32_par2.c region32_par_features.c region32_rosenfeld.c region32.c region32_algo.c |
---|
18 | FILE_MISC = bmpNR.c histogramNR.c lutNR.c mt19937.c palette.c util.c str_ext.c |
---|
19 | FILE_TEST = ecc_features_test.c ecc_test.c ecc_test_cabaret.c lsl32_test.c region32_test.c |
---|
20 | FILE_MAIN = ecc_main.c |
---|
21 | FILE = $(FILE_ECC) $(FILE_ECC_ALGO) $(FILE_ECCX_ALGO) $(FILE_ECCP_ALGO) $(FILE_LSL) $(FILE_REGION) $(FILE_MISC) $(FILE_TEST) $(FILE_MAIN) |
---|
22 | |
---|
23 | |
---|
24 | # -- Paths ---------- |
---|
25 | SRC_PATH = src |
---|
26 | OBJ_PATH = obj |
---|
27 | EXE_PATH = exe |
---|
28 | INC_PATH = include |
---|
29 | |
---|
30 | #Home |
---|
31 | LIB_LIB_PATH = -L/Users/lacas/Code/NRC2/lib |
---|
32 | LIB_INC_PATH = -I/Users/lacas/Code/NRC2/include |
---|
33 | |
---|
34 | |
---|
35 | # -- OS ---------- |
---|
36 | #OS = MACH_OSX |
---|
37 | #OS = POSIX6 |
---|
38 | OS = INTEL_CYCLE |
---|
39 | |
---|
40 | # -- Macros ---------- |
---|
41 | CC = gcc |
---|
42 | CC = icc |
---|
43 | AR = ar -rc |
---|
44 | |
---|
45 | # -- Flags ---------- |
---|
46 | # -fast: uniquement GCC-Apple |
---|
47 | C_DEBUG_FLAGS = -O0 |
---|
48 | C_OPTIMISATION_FLAGS = -std=c99 -O3 -fstrict-aliasing -ipo |
---|
49 | C_OPTIMISATION_FLAGS = -std=c99 -O3 -fstrict-aliasing |
---|
50 | # -fprefetch-loop-arrays pas avec ICC |
---|
51 | C_ARCH_FLAGS = -xSSE4.2 -vec_report0 -openmp -openmp-report2 |
---|
52 | C_ARCH_FLAGS = -xSSE4.2 -no-vec -openmp -openmp-report2 -DOPENMP |
---|
53 | C_OS_FLAGS = -D$(OS) |
---|
54 | C_CONFIG_FLAGS = -D$(CONFIG) |
---|
55 | C_INC_FLAGS = -I$(INC_PATH) |
---|
56 | |
---|
57 | CFLAGS = $(C_DEBUG_FLAGS) $(C_ARCH_FLAGS) $(C_OS_FLAGS) $(C_CONFIG_FLAGS) $(C_INC_FLAGS) $(LIB_INC_PATH) |
---|
58 | CFLAGS = $(C_OPTIMISATION_FLAGS) $(C_ARCH_FLAGS) $(C_OS_FLAGS) $(C_CONFIG_FLAGS) $(C_INC_FLAGS) $(LIB_INC_PATH) |
---|
59 | |
---|
60 | LDFLAGS = $(C_DEBUG_FLAGS) $(C_ARCH_FLAGS) $(C_OS_FLAGS) $(C_CONFIG_FLAGS)$(C_INC_FLAGS) $(LIB_LIB_PATH) |
---|
61 | LDFLAGS = $(C_OPTIMISATION_FLAGS) $(C_ARCH_FLAGS) $(C_OS_FLAGS) $(C_CONFIG_FLAGS)$(C_INC_FLAGS) $(LIB_LIB_PATH) |
---|
62 | |
---|
63 | # -- Config ---------- |
---|
64 | # if CONFIG = CLI (Command Line Interface, no Apple Framework) |
---|
65 | |
---|
66 | CONFIG = CLI |
---|
67 | |
---|
68 | # -- Final product ---------- |
---|
69 | PRODUCT = labeling.exe |
---|
70 | |
---|
71 | # -- src and obj List ---------- |
---|
72 | SRC = $(addprefix ${SRC_PATH}/, $(FILE)) |
---|
73 | OBJ = $(addprefix ${OBJ_PATH}/, $(addsuffix .o, $(basename $(FILE)))) |
---|
74 | |
---|
75 | # -- Base rules ---------- |
---|
76 | $(OBJ_PATH)/%.o : $(SRC_PATH)/%.c |
---|
77 | $(CC) $(CFLAGS) -c $< -o $@ |
---|
78 | |
---|
79 | #-----Main rule ---------- |
---|
80 | $(EXE_PATH)/$(PRODUCT): $(OBJ) |
---|
81 | $(CC) -o $@ $^ $(LDFLAGS) $(INC) $(LIB_LIB_PATH) -lnrc2x -lm -liomp5 -lpthread |
---|
82 | |
---|
83 | # -- Other stuff ---------- |
---|
84 | depend: |
---|
85 | makedepend $(CFLAGS) -Y $(SRC) |
---|
86 | |
---|
87 | clean: |
---|
88 | rm -f $(OBJ) |
---|
89 | #rm -f ${LIB_PATH}/${PRODUCT} |
---|
90 | |
---|
91 | tar: |
---|
92 | tar -cvf labeling.tar Makefile src include |
---|
93 | gzip -9 labeling.tar |
---|