Last change
on this file since 816 was
805,
checked in by meunier, 9 years ago
|
- Adding the parallel version of rosenfeld
|
File size:
1.7 KB
|
Line | |
---|
1 | |
---|
2 | # -- Paths ---------- |
---|
3 | SRC_PATH = src-par |
---|
4 | OBJ_PATH = obj |
---|
5 | EXE_PATH = bin |
---|
6 | INC_PATH = include |
---|
7 | |
---|
8 | TARGET ?= linux |
---|
9 | # |
---|
10 | # -- Config ---------- |
---|
11 | |
---|
12 | ifeq ($(TARGET),giet-vm) |
---|
13 | |
---|
14 | C_DEBUG_FLAGS = -O0 |
---|
15 | C_OPTIM_FLAGS = -std=c99 -O2 -fstrict-aliasing |
---|
16 | C_OS_FLAGS = -DGTODay -DTARGET_OS=GIETVM |
---|
17 | C_CONFIG_FLAGS = -DCLI |
---|
18 | C_INC_FLAGS = -I$(INC_PATH) -Inrc2/include -I../.. -I../../giet_libs -I../../giet_xml/ |
---|
19 | CFLAGSCPU := -mips32 -EL -G0 -mhard-float -fomit-frame-pointer -fno-builtin -ffreestanding |
---|
20 | |
---|
21 | LDFLAGS := -Lnrc2 -L../../build/libs -Trosenfeld.ld --start-group -lnrc2x -luser -lmath --end-group |
---|
22 | |
---|
23 | endif |
---|
24 | |
---|
25 | ifeq ($(TARGET),linux) |
---|
26 | |
---|
27 | CC = gcc |
---|
28 | LD = gcc |
---|
29 | |
---|
30 | # -- Config ---------- |
---|
31 | C_DEBUG_FLAGS = -O0 |
---|
32 | C_OPTIM_FLAGS = -std=c99 -O2 -fstrict-aliasing |
---|
33 | C_OS_FLAGS = -DGTODay -DTARGET_OS=LINUX |
---|
34 | C_CONFIG_FLAGS = -DCLI |
---|
35 | C_INC_FLAGS = -I$(INC_PATH) -Inrc2/include |
---|
36 | CFLAGSCPU = |
---|
37 | |
---|
38 | LDFLAGS := -Lnrc2 -Wl,--start-group -lnrc2x -lm -Wl,--end-group |
---|
39 | |
---|
40 | endif |
---|
41 | |
---|
42 | |
---|
43 | |
---|
44 | CFLAGSW := -Wredundant-decls -Wdisabled-optimization -Winline -Wpointer-arith -Wsign-compare -Wendif-labels -Wno-unused-function -Wno-unused-variable |
---|
45 | |
---|
46 | # -- Flags ---------- |
---|
47 | #CFLAGS = $(C_DEBUG_FLAGS) $(C_OS_FLAGS) $(C_INC_FLAGS) $(C_CONFIG_FLAGS) |
---|
48 | CFLAGS = $(C_OPTIM_FLAGS) $(C_OS_FLAGS) $(C_INC_FLAGS) $(C_CONFIG_FLAGS) -g -Wall $(CFLAGSW) $(CFLAGSCPU) |
---|
49 | |
---|
50 | |
---|
51 | APP_NAME = appli.elf |
---|
52 | |
---|
53 | SRC_FILE = $(wildcard $(SRC_PATH)/*.c) |
---|
54 | INC_FILE = $(wildcard $(SRC_PATH)/*.h) |
---|
55 | |
---|
56 | #SRC = $(addprefix $(SRC_PATH)/,$(FILE)) |
---|
57 | OBJ_FILE = $(addprefix $(OBJ_PATH)/,$(addsuffix .o, $(basename $(notdir $(SRC_FILE))))) |
---|
58 | |
---|
59 | |
---|
60 | |
---|
61 | |
---|
62 | |
---|
63 | all: $(APP_NAME) |
---|
64 | |
---|
65 | $(APP_NAME): $(OBJ_FILE) |
---|
66 | $(LD) -o $@ $^ $(LDFLAGS) |
---|
67 | |
---|
68 | $(OBJ_PATH)/%.o: $(SRC_PATH)/%.c $(INC_FILE) nrc2/libnrc2x.a ../../build/libs/libuser.a |
---|
69 | $(CC) -c $(CFLAGS) -o $@ $< |
---|
70 | |
---|
71 | clean: |
---|
72 | rm -f $(OBJ_FILE) |
---|
73 | rm -f $(APP_NAME) |
---|
74 | |
---|
75 | |
---|
76 | |
---|
Note: See
TracBrowser
for help on using the repository browser.