adb4b2c6 |
1 | CC = $(CROSS_COMPILE)gcc |
2 | CXX = $(CROSS_COMPILE)g++ |
3 | CC_ = $(CROSS_COMPILE)gcc |
4 | |
5 | ARCH = $(shell $(CC) -v 2>&1 | grep -i 'target:' | awk '{print $$2}' | awk -F '-' '{print $$1}') |
6 | |
7 | CFLAGS += -ggdb -Wall |
8 | CFLAGS += -O2 |
9 | ifeq "$(ARCH)" "arm" |
10 | CFLAGS += -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp |
11 | endif |
12 | ifeq "$(ARCH)" "x86_64" |
13 | CFLAGS += -m32 |
14 | endif |
15 | |
16 | # test_neon |
17 | TARGETS = test_peops test_unai |
18 | SRC += test.c |
19 | |
20 | all: $(TARGETS) |
21 | |
22 | test_neon: SRC += psx_gpu_if.c |
23 | test_neon: CFLAGS += -fno-strict-aliasing |
24 | test_peops: SRC += peops_if.c |
25 | test_peops: CFLAGS += -fno-strict-aliasing |
26 | test_unai: SRC += unai_if.cpp |
27 | test_unai: CC_ = $(CXX) |
28 | |
29 | $(TARGETS): $(SRC) |
30 | $(CC_) -o $@ $(SRC) $(CFLAGS) $(LDFLAGS) |
31 | |
32 | clean: |
33 | $(RM) $(TARGETS) |