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

Last change on this file since 821 was 821, checked in by meunier, 9 years ago
  • Added several versions of rosenfeld: { SLOW, FAST } x { FEATURES, NO_FEATURES }
  • Added native linux compilation support
  • Added a script to check results natively
  • Started to refactor nrc code
File size: 1.7 KB
RevLine 
[772]1
2# -- Paths ----------
[805]3SRC_PATH = src-par
[772]4OBJ_PATH = obj
5EXE_PATH = bin
6INC_PATH = include
7
[798]8TARGET ?= linux
9#
10# -- Config ----------
[772]11
[798]12ifeq ($(TARGET),giet-vm)
13
[772]14C_DEBUG_FLAGS = -O0
15C_OPTIM_FLAGS = -std=c99 -O2 -fstrict-aliasing
[798]16C_OS_FLAGS = -DGTODay -DTARGET_OS=GIETVM
[772]17C_CONFIG_FLAGS = -DCLI
18C_INC_FLAGS = -I$(INC_PATH) -Inrc2/include -I../.. -I../../giet_libs -I../../giet_xml/
[798]19CFLAGSCPU := -mips32 -EL -G0 -mhard-float -fomit-frame-pointer -fno-builtin -ffreestanding
[772]20
[798]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
[821]33C_OS_FLAGS = -DGTODay -DTARGET_OS=LINUX -D_GNU_SOURCE
[798]34C_CONFIG_FLAGS = -DCLI
35C_INC_FLAGS = -I$(INC_PATH) -Inrc2/include
36CFLAGSCPU = 
37
[821]38LDFLAGS := -Lnrc2 -Wl,--start-group -lnrc2x -lm -lpthread -Wl,--end-group
[798]39
40endif
41
42
43
[805]44CFLAGSW := -Wredundant-decls -Wdisabled-optimization -Winline -Wpointer-arith -Wsign-compare -Wendif-labels -Wno-unused-function -Wno-unused-variable
[798]45
[772]46# -- Flags ----------
47#CFLAGS = $(C_DEBUG_FLAGS) $(C_OS_FLAGS) $(C_INC_FLAGS) $(C_CONFIG_FLAGS)
[798]48CFLAGS = $(C_OPTIM_FLAGS) $(C_OS_FLAGS) $(C_INC_FLAGS) $(C_CONFIG_FLAGS) -g -Wall $(CFLAGSW) $(CFLAGSCPU)
[772]49
50
[791]51APP_NAME = appli.elf
[772]52
53SRC_FILE = $(wildcard $(SRC_PATH)/*.c)
[821]54INC_FILE = $(wildcard $(INC_PATH)/*.h)
[772]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
[821]68$(OBJ_PATH)/%.o: $(SRC_PATH)/%.c $(INC_FILE) nrc2/libnrc2x.a ../../build/libs/libuser.a nrc2/include/nrc_os_config.h
[772]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.