source: soft/giet_vm/applications/rosenfeld/Makefile @ 820

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