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

Last change on this file since 824 was 823, checked in by meunier, 9 years ago
  • Improved scripts for simulations and graphes
  • Continued to clean up the lib nrc2 (from nrio2x.x to nrmem1.c)
  • Added a version (Fast - Parmerge - No stats)
File size: 1.9 KB
Line 
1
2# -- Paths ----------
3SRC_PATH = src-par
4OBJ_PATH = obj
5INC_PATH = include
6
7TARGET ?= linux
8IGNORE_ASSERT ?= false
9
10#
11# -- Config ----------
12
13ifeq ($(TARGET),giet-vm)
14
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_OPTIM_FLAGS = -std=c99 -O2 -fstrict-aliasing
32C_OS_FLAGS = -DGTODay -DTARGET_OS=LINUX -D_GNU_SOURCE
33C_CONFIG_FLAGS = -DCLI
34C_INC_FLAGS = -I$(INC_PATH) -Inrc2/include
35CFLAGSCPU = 
36ifeq ($(IGNORE_ASSERT),true)
37C_OPTIM_FLAGS := $(C_OPTIM_FLAGS) -DNDEBUG
38endif
39
40LDFLAGS = -Lnrc2 -Wl,--start-group -lnrc2x -lm -lpthread -Wl,--end-group
41
42endif
43
44
45
46CFLAGSW = -Wredundant-decls -Wdisabled-optimization -Winline -Wpointer-arith -Wsign-compare -Wendif-labels -Wno-unused-function -Wno-unused-variable
47
48# -- Flags ----------
49CFLAGS = $(C_OPTIM_FLAGS) $(C_OS_FLAGS) $(C_INC_FLAGS) $(C_CONFIG_FLAGS) -g -Wall $(CFLAGSW) $(CFLAGSCPU)
50
51
52APP_NAME = appli.elf
53
54SRC_FILE = $(wildcard $(SRC_PATH)/*.c)
55INC_FILE = $(wildcard $(INC_PATH)/*.h)
56
57#SRC = $(addprefix $(SRC_PATH)/,$(FILE))
58OBJ_FILE = $(addprefix $(OBJ_PATH)/,$(addsuffix .o, $(basename $(notdir $(SRC_FILE)))))
59
60
61
62
63
64all: nrclib $(APP_NAME)
65
66nrclib:
67        make -C nrc2
68
69$(APP_NAME): $(OBJ_FILE)
70        $(LD) -o $@ $^ $(LDFLAGS)
71
72#obj/bmpNR.o: src-par/bmpNR.c $(INC_FILE) nrc2/libnrc2x.a ../../build/libs/libuser.a nrc2/include/nrc_os_config.h
73#       $(CC) -c $(CFLAGS) -o $@ $<
74
75$(OBJ_PATH)/%.o: $(SRC_PATH)/%.c $(INC_FILE) nrc2/libnrc2x.a ../../build/libs/libuser.a nrc2/include/nrc_os_config.h
76        $(CC) -c $(CFLAGS) -o $@ $<
77
78clean:
79        rm -f $(OBJ_FILE)
80        rm -f $(APP_NAME)
81
82
83
Note: See TracBrowser for help on using the repository browser.