1 | # |
---|
2 | # $Id: Makefile 124 2009-06-17 12:11:25Z rosiere $ |
---|
3 | # |
---|
4 | # [ Description ] |
---|
5 | # |
---|
6 | # Makefile |
---|
7 | # |
---|
8 | |
---|
9 | include Makefile.defs |
---|
10 | |
---|
11 | #-----[ Specint variable ]-------------------------------------------------------- |
---|
12 | |
---|
13 | SPECINT2000_PATH = /users/cao/kane/Project/SPEC_CPU2000/benchspec/CINT2000 |
---|
14 | SPECINT2000_PATHS = $(addprefix $(SPECINT2000_PATH)/, $(BENCHS)) |
---|
15 | |
---|
16 | SPECINT2000_PATH_INC = $(addprefix -I, $(addsuffix /src, $(SPECINT2000_PATHS))) |
---|
17 | SPECINT2000_PATH_SRC = $(wildcard $(addsuffix /src , $(SPECINT2000_PATHS))) |
---|
18 | SPECINT2000_OBJECTS = $(foreach bench,$(BENCHS),$(addprefix $(DIR_OBJ)/$(bench)_, $(addsuffix .o, $(basename $(notdir $(wildcard $(SPECINT2000_PATH)/$(bench)/src/*.c)))))) |
---|
19 | |
---|
20 | #-----[ Directory ]--------------------------------------------------------------- |
---|
21 | |
---|
22 | DIR_SOFT = .. |
---|
23 | |
---|
24 | DIR_SRC = ./src |
---|
25 | DIR_C = $(DIR_SRC)/c |
---|
26 | DIR_ASM = $(DIR_SRC)/asm |
---|
27 | DIR_SYS = $(DIR_SRC)/sys |
---|
28 | DIR_INC = $(DIR_SRC)/include |
---|
29 | DIR_LDSCRIPT = $(NEWLIB)/lib/ |
---|
30 | |
---|
31 | INCDIR = $(NEWLIB_INCDIR) -I$(DIR_INC) |
---|
32 | LIBDIR = $(NEWLIB_LIBDIR) |
---|
33 | LIBNAME = $(NEWLIB_LIBNAME) |
---|
34 | |
---|
35 | #-----[ Flags ]------------------------------------------------------------------- |
---|
36 | |
---|
37 | FLAGS = -DSPECINT2000_PATH=\"$(SPECINT2000_PATH)\" -DNB_THREAD_MAX=$(NB_THREAD_MAX) |
---|
38 | |
---|
39 | FLAGS_164.gzip = -I$(SPECINT2000_PATH)/164.gzip/src |
---|
40 | FLAGS_175.vpr = -I$(SPECINT2000_PATH)/175.vpr/src -DSPEC_CPU2000 |
---|
41 | FLAGS_176.gcc = -I$(SPECINT2000_PATH)/176.gcc/src |
---|
42 | FLAGS_181.mcf = -I$(SPECINT2000_PATH)/181.mcf/src -DWANT_STDC_PROTO |
---|
43 | FLAGS_186.crafty = -I$(SPECINT2000_PATH)/186.crafty/src |
---|
44 | FLAGS_197.parser = -I$(SPECINT2000_PATH)/197.parser/src |
---|
45 | FLAGS_252.eon = -I$(SPECINT2000_PATH)/252.eon/src |
---|
46 | FLAGS_253.perlbmk = -I$(SPECINT2000_PATH)/253.perlbmk/src |
---|
47 | FLAGS_254.gap = -I$(SPECINT2000_PATH)/254.gap/src |
---|
48 | FLAGS_255.vortex = -I$(SPECINT2000_PATH)/255.vortex/src |
---|
49 | FLAGS_256.bzip2 = -I$(SPECINT2000_PATH)/256.bzip2/src -DWANT_STDC_PROTO |
---|
50 | FLAGS_300.twolf = -I$(SPECINT2000_PATH)/300.twolf/src -DSPEC_CPU2000 |
---|
51 | |
---|
52 | #-----[ Files ]------------------------------------------------------------------- |
---|
53 | OBJECTS = $(NEWLIB)/lib/*.o \ |
---|
54 | $(patsubst $(DIR_ASM)/%.s,$(DIR_OBJ)/%.o,$(wildcard $(DIR_ASM)/*.s)) \ |
---|
55 | $(patsubst $(DIR_SYS)/%.s,$(DIR_OBJ)/%.o,$(wildcard $(DIR_SYS)/*.s)) \ |
---|
56 | $(patsubst $(DIR_C)/%.c,$(DIR_OBJ)/%.o,$(wildcard $(DIR_C)/*.c)) \ |
---|
57 | $(SPECINT2000_OBJECTS) |
---|
58 | |
---|
59 | vpath %.h $(SPECINT2000_PATH_INC) |
---|
60 | # vpath %.c $(SPECINT2000_PATH_SRC) |
---|
61 | |
---|
62 | include $(DIR_SOFT)/Makefile.Software |
---|
63 | include $(DIR_SOFT)/Makefile.Workload |
---|
64 | |
---|
65 | $(DIR_OBJ)/164.gzip_%.o : $(SPECINT2000_PATH)/164.gzip/src/%.c |
---|
66 | @\ |
---|
67 | $(ECHO) "Compilation : $*.c"; \ |
---|
68 | $(OR32_CC) $(OR32_CC_OPT) $(FLAGS_164.gzip) -o $@ -c $^ ; |
---|
69 | |
---|
70 | $(DIR_OBJ)/175.vpr_%.o : $(SPECINT2000_PATH)/175.vpr/src/%.c |
---|
71 | @\ |
---|
72 | $(ECHO) "Compilation : $*.c"; \ |
---|
73 | $(OR32_CC) $(OR32_CC_OPT) $(FLAGS_175.vpr) -o $@ -c $^ ; |
---|
74 | |
---|
75 | $(DIR_OBJ)/176.gcc_%.o : $(SPECINT2000_PATH)/176.gcc/src/%.c |
---|
76 | @\ |
---|
77 | $(ECHO) "Compilation : $*.c"; \ |
---|
78 | $(OR32_CC) $(OR32_CC_OPT) $(FLAGS_176.gcc) -o $@ -c $^ ; |
---|
79 | |
---|
80 | $(DIR_OBJ)/181.mcf_%.o : $(SPECINT2000_PATH)/181.mcf/src/%.c |
---|
81 | @\ |
---|
82 | $(ECHO) "Compilation : $*.c"; \ |
---|
83 | $(OR32_CC) $(OR32_CC_OPT) $(FLAGS_181.mcf) -o $@ -c $^ ; |
---|
84 | |
---|
85 | $(DIR_OBJ)/186.crafty_%.o : $(SPECINT2000_PATH)/186.crafty/src/%.c |
---|
86 | @\ |
---|
87 | $(ECHO) "Compilation : $*.c"; \ |
---|
88 | $(OR32_CC) $(OR32_CC_OPT) $(FLAGS_186.crafty) -o $@ -c $^ ; |
---|
89 | |
---|
90 | $(DIR_OBJ)/255.vortex_%.o : $(SPECINT2000_PATH)/255.vortex/src/%.c |
---|
91 | @\ |
---|
92 | $(ECHO) "Compilation : $*.c"; \ |
---|
93 | $(OR32_CC) $(OR32_CC_OPT) $(FLAGS_255.vortex) -o $@ -c $^ ; |
---|
94 | |
---|
95 | $(DIR_OBJ)/197.parser_%.o : $(SPECINT2000_PATH)/197.parser/src/%.c |
---|
96 | @\ |
---|
97 | $(ECHO) "Compilation : $*.c"; \ |
---|
98 | $(OR32_CC) $(OR32_CC_OPT) $(FLAGS_197.parser) -o $@ -c $^ ; |
---|
99 | |
---|
100 | $(DIR_OBJ)/252.eon_%.o : $(SPECINT2000_PATH)/252.eon/src/%.c |
---|
101 | @\ |
---|
102 | $(ECHO) "Compilation : $*.c"; \ |
---|
103 | $(OR32_CC) $(OR32_CC_OPT) $(FLAGS_252.eon) -o $@ -c $^ ; |
---|
104 | |
---|
105 | $(DIR_OBJ)/253.perlbmk_%.o : $(SPECINT2000_PATH)/253.perlbmk/src/%.c |
---|
106 | @\ |
---|
107 | $(ECHO) "Compilation : $*.c"; \ |
---|
108 | $(OR32_CC) $(OR32_CC_OPT) $(FLAGS_253.perlbmk) -o $@ -c $^ ; |
---|
109 | |
---|
110 | $(DIR_OBJ)/254.gap_%.o : $(SPECINT2000_PATH)/254.gap/src/%.c |
---|
111 | @\ |
---|
112 | $(ECHO) "Compilation : $*.c"; \ |
---|
113 | $(OR32_CC) $(OR32_CC_OPT) $(FLAGS_254.gap) -o $@ -c $^ ; |
---|
114 | |
---|
115 | $(DIR_OBJ)/256.bzip2_%.o : $(SPECINT2000_PATH)/256.bzip2/src/%.c |
---|
116 | @\ |
---|
117 | $(ECHO) "Compilation : $*.c"; \ |
---|
118 | $(OR32_CC) $(OR32_CC_OPT) $(FLAGS_256.bzip2) -o $@ -c $^ ; |
---|
119 | |
---|
120 | $(DIR_OBJ)/300.twolf_%.o : $(SPECINT2000_PATH)/300.twolf/src/%.c |
---|
121 | @\ |
---|
122 | $(ECHO) "Compilation : $*.c"; \ |
---|
123 | $(OR32_CC) $(OR32_CC_OPT) $(FLAGS_300.twolf) -o $@ -c $^ ; |
---|