Last change
on this file since 778 was
772,
checked in by meunier, 9 years ago
|
- Ajout de l'application rosenfeld
- Changement du nom du flag O_CREATE en O_CREAT
|
File size:
1.3 KB
|
Rev | Line | |
---|
[772] | 1 | |
---|
| 2 | # -- Paths ---------- |
---|
| 3 | SRC_PATH = src |
---|
| 4 | OBJ_PATH = obj |
---|
| 5 | EXE_PATH = bin |
---|
| 6 | INC_PATH = include |
---|
| 7 | |
---|
| 8 | |
---|
| 9 | # -- Config ---------- |
---|
| 10 | C_DEBUG_FLAGS = -O0 |
---|
| 11 | C_OPTIM_FLAGS = -std=c99 -O2 -fstrict-aliasing |
---|
| 12 | C_OS_FLAGS = -DGTODay |
---|
| 13 | C_CONFIG_FLAGS = -DCLI |
---|
| 14 | C_INC_FLAGS = -I$(INC_PATH) -Inrc2/include -I../.. -I../../giet_libs -I../../giet_xml/ |
---|
| 15 | |
---|
| 16 | # -- Flags ---------- |
---|
| 17 | #CFLAGS = $(C_DEBUG_FLAGS) $(C_OS_FLAGS) $(C_INC_FLAGS) $(C_CONFIG_FLAGS) |
---|
| 18 | CFLAGS = $(C_OPTIM_FLAGS) $(C_OS_FLAGS) $(C_INC_FLAGS) $(C_CONFIG_FLAGS) |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | APP_NAME = rosenfeld |
---|
| 22 | |
---|
| 23 | SRC_FILE = $(wildcard $(SRC_PATH)/*.c) |
---|
| 24 | INC_FILE = $(wildcard $(SRC_PATH)/*.h) |
---|
| 25 | |
---|
| 26 | #SRC = $(addprefix $(SRC_PATH)/,$(FILE)) |
---|
| 27 | OBJ_FILE = $(addprefix $(OBJ_PATH)/,$(addsuffix .o, $(basename $(notdir $(SRC_FILE))))) |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | CFLAGSW := -Wredundant-decls -Wdisabled-optimization -Winline -Wpointer-arith -Wsign-compare -Wendif-labels |
---|
| 31 | CFLAGSCPU := -mips32 -EL -G0 -mhard-float |
---|
| 32 | CFLAGS := $(CFLAGS) -g -Wall -fomit-frame-pointer $(CFLAGSW) $(CFLAGSCPU) -I$(INC_PATH) -fno-builtin -ffreestanding |
---|
| 33 | |
---|
| 34 | LDFLAGS := -Lnrc2 -L../../build/libs -T$(APP_NAME).ld --start-group -lnrc2x -luser -lmath --end-group |
---|
| 35 | |
---|
| 36 | |
---|
| 37 | all: $(APP_NAME) |
---|
| 38 | |
---|
| 39 | $(APP_NAME): $(OBJ_FILE) |
---|
| 40 | $(LD) -o $@ $^ $(LDFLAGS) |
---|
| 41 | |
---|
| 42 | $(OBJ_PATH)/%.o: $(SRC_PATH)/%.c $(INC_FILE) nrc2/libnrc2x.a ../../build/libs/libuser.a |
---|
| 43 | $(CC) -c $(CFLAGS) -o $@ $< |
---|
| 44 | |
---|
| 45 | clean: |
---|
| 46 | rm -f $(OBJ_FILE) |
---|
| 47 | rm -f $(APP_NAME) |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | |
---|
Note: See
TracBrowser
for help on using the repository browser.