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 | FILE_LSL = lsl.c lsl32.c lsl32_par.c lsl32_par1.c lsl32_par2.c |
---|
15 | #FILE_REGION = region32.c region32_algo.c region32_par1.c region32_par2.c region32_par_features.c region32_rosenfeld.c |
---|
16 | FILE_REGION = region32_par1.c region32_par2.c region32_par_features.c region32_rosenfeld.c region32.c region32_algo.c |
---|
17 | FILE_MISC = bmpNR.c histogramNR.c lutNR.c mt19937.c palette.c util.c str_ext.c |
---|
18 | FILE_TEST = ecc_features_test.c ecc_test.c ecc_test_cabaret.c lsl32_test.c region32_test.c |
---|
19 | FILE_MAIN = ecc_main.c |
---|
20 | |
---|
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 | # -- Paths ---------- |
---|
24 | SRC_PATH = src |
---|
25 | OBJ_PATH = obj |
---|
26 | EXE_PATH = exe |
---|
27 | INC_PATH = include |
---|
28 | |
---|
29 | #Home |
---|
30 | LIB_LIB_PATH = -L/Users/lacas/Code/NRC2/lib |
---|
31 | LIB_INC_PATH = -I/Users/lacas/Code/NRC2/include |
---|
32 | |
---|
33 | |
---|
34 | # -- OS ---------- |
---|
35 | #OS = MACH_OSX |
---|
36 | #OS = POSIX6 |
---|
37 | OS = INTEL_CYCLE |
---|
38 | |
---|
39 | # -- Macros ---------- |
---|
40 | CC = gcc |
---|
41 | CC = icc |
---|
42 | AR = ar -rc |
---|
43 | |
---|
44 | # -- Flags ---------- |
---|
45 | # -fast: uniquement GCC-Apple |
---|
46 | C_DEBUG_FLAGS = -O0 |
---|
47 | C_OPTIMISATION_FLAGS = -O3 -fstrict-aliasing -ipo # ipo ralenti |
---|
48 | C_OPTIMISATION_FLAGS = -std=c99 -O3 -fstrict-aliasing |
---|
49 | #C_OPTIMISATION_FLAGS = -fstrict-aliasing |
---|
50 | # -fprefetch-loop-arrays pas avec ICC |
---|
51 | C_ARCH_FLAGS = -xSSE4.2 -vec_report0 -openmp -openmp-report2 |
---|
52 | C_ARCH_FLAGS = |
---|
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 |
---|
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 |
---|