1 | # ------------------ # |
---|
2 | # -- NRC Makefile -- # |
---|
3 | # ------------------ # |
---|
4 | |
---|
5 | # Copyright (c) 2000-2007 Lionel Lacassagne |
---|
6 | # with a little help of Stephane Piskorski and Joel Falcou |
---|
7 | |
---|
8 | # -- File list ---------- |
---|
9 | FILE = nralloc1.c, nralloc2.c, nralloc2x.c, nrarith0.c, nrarith1.c, nrarith2.c, nrarith2x.c, nrbool1.c, nrbool2.c, nrhisto.c, nrio0.c, nrio1.c, nrio2.c, nrkernel.c, nrlinalg.c, nrlut.c, nrmem1.c, nrmem1x.c, nrmem2.c, nrmem2x.c, nrset1.c, nrset2.c, nrset2x.c, nrsort1.c, nrsort2.c, nrwrap1.c, nrwrap2.c |
---|
10 | |
---|
11 | |
---|
12 | |
---|
13 | # -- Paths ---------- |
---|
14 | SRC_PATH = src |
---|
15 | OBJ_PATH = obj |
---|
16 | INC_PATH = include |
---|
17 | |
---|
18 | |
---|
19 | C_DEBUG_FLAGS = -O0 |
---|
20 | C_OPTIMISATION_FLAGS = -std=c99 -O2 -fstrict-aliasing |
---|
21 | C_OS_FLAGS = -DGTODay |
---|
22 | C_CONFIG_FLAGS = -DCLI |
---|
23 | C_INC_FLAGS = -I$(INC_PATH) -I../../.. -I../../../giet_libs |
---|
24 | |
---|
25 | # -- Flags ---------- |
---|
26 | CFLAGS = $(C_OPTIMISATION_FLAGS) $(C_OS_FLAGS) $(C_INC_FLAGS) |
---|
27 | |
---|
28 | |
---|
29 | #------------------------------------------------------------------------------ |
---|
30 | # CC tools and parameters |
---|
31 | #------------------------------------------------------------------------------ |
---|
32 | CC = mipsel-unknown-elf-gcc |
---|
33 | AR = mipsel-unknown-elf-ar -cr |
---|
34 | AS = mipsel-unknown-elf-as |
---|
35 | OD = mipsel-unknown-elf-objdump |
---|
36 | OCPY = mipsel-unknown-elf-objcopy |
---|
37 | LD = mipsel-unknown-elf-ld |
---|
38 | NM = mipsel-unknown-elf-nm |
---|
39 | |
---|
40 | CFLAGSW := -Wredundant-decls -Wdisabled-optimization -Winline -Wpointer-arith -Wsign-compare -Wendif-labels |
---|
41 | CFLAGSCPU := -mips32 -EL -G0 -mhard-float |
---|
42 | CFLAGS := $(CFLAGS) -g -Wall -fomit-frame-pointer $(CFLAGSW) $(CFLAGSCPU) -I$(DIR_INC) -fno-builtin -ffreestanding |
---|
43 | |
---|
44 | |
---|
45 | PRODUCT = libnrc2x.a |
---|
46 | |
---|
47 | OBJS = $(addprefix $(OBJ_PATH)/, $(addsuffix .o, $(basename $(FILE)))) |
---|
48 | |
---|
49 | all: $(PRODUCT) |
---|
50 | |
---|
51 | $(OBJ_PATH)/%.o: $(SRC_PATH)/%.c |
---|
52 | $(CC) -c $(CFLAGS) -o $@ $< |
---|
53 | |
---|
54 | |
---|
55 | $(PRODUCT): $(OBJS) |
---|
56 | $(AR) $@ $^ |
---|
57 | ranlib $@ |
---|
58 | |
---|
59 | clean: |
---|
60 | rm -f $(OBJS) |
---|
61 | rm -f $(PRODUCT) |
---|
62 | |
---|