source: branches/reconfiguration/modules/dspin_router/caba/test/common.mk @ 942

Last change on this file since 942 was 942, checked in by cfuguet, 9 years ago

reconf: improve unitary tests for dspin_router

  • Property svn:executable set to *
File size: 2.1 KB
Line 
1LD         := mipsel-unknown-elf-ld
2CC         := mipsel-unknown-elf-gcc
3AS         := mipsel-unknown-elf-as
4DU         := mipsel-unknown-elf-objdump
5AR         := mipsel-unknown-elf-ar
6RM         := rm -rf
7ECHO       := @echo
8MKDIR      := mkdir
9HEXDUMP    := hexdump
10DOXYGEN    := doxygen
11SED        := sed
12SHELL      := bash
13
14CFLAGS     := -Wall                        \
15              -mno-gpopt                   \
16              -ffreestanding               \
17              -fomit-frame-pointer         \
18              -march=mips32                \
19              -Og                          \
20              -ggdb                        \
21#             -msoft-float                 \
22#             -Werror                      \
23#             -Wno-unused-but-set-variable \
24#             -std=gnu99                   \
25#             -mlong-calls                 \
26
27BUILD_DIR  := build
28
29UTILS_PATH := ../../../../../softs
30MDLS_PATH  := ../../../..
31
32INCLUDE    := -I$(UTILS_PATH)/drivers/ \
33              -I$(UTILS_PATH)/libs/ \
34              -I$(UTILS_PATH)/mach/     \
35              -I$(MDLS_PATH)/vci_xicu/include \
36              -I$(MDLS_PATH)/dspin_router/include \
37                          -I.
38
39VPATH      := $(UTILS_PATH)/drivers/ \
40              $(UTILS_PATH)/libs/ \
41              $(UTILS_PATH)/mach/
42
43# ============================================================================
44# Debug compilation flags
45# ============================================================================
46
47DEBUG_DEFS ?=
48
49DEBUG ?= 1
50ifeq ($(DEBUG),0)
51    DEBUG_DEFS += -DNDEBUG # deactivate assertions
52endif
53
54# ============================================================================
55# Compilation flags
56# ============================================================================
57
58DEFS := $(DEBUG_DEFS)
59
60# =============================================================================
61# Implicit makefile rules
62# =============================================================================
63
64$(BUILD_DIR)/%.o: %.c
65        $(CC) $(DEFS) $(CFLAGS) $(INCLUDE) -c -o $@ $<
66        $(DU) -D $@ > $@.txt
67
68$(BUILD_DIR)/%.o: %.S
69        $(CC) $(DEFS) $(CFLAGS) $(INCLUDE) -c -o $@ $<
70        $(DU) -D $@ > $@.txt
71
Note: See TracBrowser for help on using the repository browser.