-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (31 loc) · 1.14 KB
/
Makefile
File metadata and controls
48 lines (31 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
CC = arm-linux-gnueabihf-gcc
CXX = arm-linux-gnueabihf-g++
STRIP = arm-linux-gnueabihf-strip
DEP_DIR ?=$(shell pwd)/../dependency
LIBRARY_INC = $(DEP_DIR)/release/include/cust_inc
LIBRARY_DIR = $(DEP_DIR)/release/nvr/i2m/common/glibc/8.2.1/cust_libs
TARGET = sdlpal
#HOST = arm-linux-
SOURCES = . ./adplug
CFILES = $(foreach dir, $(SOURCES), $(wildcard $(dir)/*.c))
CPPFILES = $(foreach dir, $(SOURCES), $(wildcard $(dir)/*.cpp))
OFILES = $(CFILES:.c=.o) $(CPPFILES:.cpp=.o)
CFLAGS = -Wall -g -DDINGOO -mtune=arm926ej-s -march=armv5te
CFLAGS+=-I$(LIBRARY_INC) -I$(LIBRARY_INC)/SDL
CXXFLAGS = $(CFLAGS)
LDFLAGS += -lm -lz -lstdc++ -lSDL #-lssgfx
LDFLAGS += -lmi_common -lmi_sys -lmi_disp -lmi_panel -lmi_gfx -lmi_divp -lmi_ao -lmad
LDFLAGS+= -L$(DEP_DIR)/release/nvr/i2m/common/glibc/8.2.1/mi_libs/dynamic
LDFLAGS+= -L$(DEP_DIR)/release/nvr/i2m/common/glibc/8.2.1/ex_libs/dynamic
LDFLAGS+=-L$(LIBRARY_DIR)/dynamic/
$(TARGET): $(OFILES)
$(CXX) $(OFILES) -g -o $@ $(LDFLAGS)
#$(STRIP) $@
%.o: %.c
$(CC) $(CFLAGS) -g -c $< -o $@
%.o: %.cpp
$(CXX) $(CXXFLAGS) -g -c $< -o $@
clean:
rm -f $(TARGET) $(OFILES)
install:
echo do nothing for install