forked from AlisterT/openjazz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.arm
91 lines (82 loc) · 2.04 KB
/
Makefile.arm
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# OpenJazz makefile
ifeq ($(BUILDTYPE),PANDORA)
PROGRAM = OpenJazz
PREFIX = /mythtv/media/devel/toolchains/pandora/arm-2007q3
TOOLS = bin
TARGET = arm-none-linux-gnueabi-
INCLUDE = $(PREFIX)/include
LIBRARY = $(PREFIX)/lib
else
ifeq ($(BUILDTYPE),CAANOO)
PROGRAM = OpenJazzCaanoo
PREFIX = /mythtv/media/devel/toolchains/caanoo/GPH_SDK
TOOLS = tools/gcc-4.2.4-glibc-2.7-eabi/bin
TARGET = arm-gph-linux-gnueabi-
INCLUDE = $(PREFIX)/DGE/include
LIBRARY = $(PREFIX)/DGE/lib/target
else
ifeq ($(BUILDTYPE),WIZ)
PROGRAM = OpenJazzWiz
PREFIX = /mythtv/media/devel/toolchains/openwiz/arm-openwiz-linux-gnu
TOOLS = bin
TARGET = arm-openwiz-linux-gnu-
INCLUDE = $(PREFIX)/include
LIBRARY = $(PREFIX)/lib
else
ifeq ($(BUILDTYPE),GP2X)
PROGRAM = OpenJazzGp2x
PREFIX = /mythtv/media/devel/toolchains/open2x/gcc-4.1.1-glibc-2.3.6
TOOLS = bin
TARGET = arm-open2x-linux-
INCLUDE = $(PREFIX)/include
LIBRARY = $(PREFIX)/lib
else # default linux
PROGRAM = OpenJazz
PREFIX = /usr
TOOLS = bin
TARGET =
INCLUDE = $(PREFIX)/include
LIBRARY = $(PREFIX)/lib
endif
endif
endif
endif
include openjazz.mk
CXX = $(PREFIX)/$(TOOLS)/$(TARGET)g++
ifeq ($(BUILDTYPE),PANDORA)
CXXFLAGS += -DSCALE
LDFLAGS += -lts
else
ifeq ($(BUILDTYPE),CAANOO)
OBJS += src/platforms/wiz.o
CXXFLAGS += -DCAANOO -DFULLSCREEN_ONLY
LDFLAGS +=
else
ifeq ($(BUILDTYPE),WIZ)
OBJS += src/platforms/wiz.o
CXXFLAGS += -DWIZ -DFULLSCREEN_ONLY
LDFLAGS +=
else
ifeq ($(BUILDTYPE),GP2X)
OBJS += src/platforms/wiz.o
CXXFLAGS += -DGP2X -DFULLSCREEN_ONLY
LDFLAGS += -static -lpthread
else # default linux
CXXFLAGS += -DSCALE
LDFLAGS +=
endif
endif
endif
endif
CXXFLAGS += -g -Wall -O3 -fsigned-char -DUSE_SOCKETS -DLOWERCASE_FILENAMES -DUPPERCASE_FILENAMES -I$(INCLUDE) -I$(INCLUDE)/SDL -Isrc
LDFLAGS += -L$(LIBRARY) -lSDL -lz
# Uncomment the following two lines for music (requires libmodplug)
CXXFLAGS += -DUSE_MODPLUG -I$(INCLUDE)/libmodplug
LDFLAGS += $(LIBRARY)/libmodplug.a
#-lmodplug
$(PROGRAM): $(OBJS)
$(CXX) $(CXXFLAGS) -o $(PROGRAM) $(OBJS) $(LDFLAGS)
%.o: %.cpp
$(CXX) $(CXXFLAGS) -c $< -o $@
clean:
rm -f $(PROGRAM) $(OBJS)