1.80 readme and filter for it
[libpicofe.git] / pandora / Makefile
... / ...
CommitLineData
1#export CROSS = arm-none-linux-gnueabi-\r
2CROSS ?= $(CROSS_COMPILE)\r
3LIBROOT = /home/notaz/dev/pnd/libroot\r
4PND_MAKE ?= $(HOME)/dev/pnd/src/pandora-libraries/testdata/scripts/pnd_make.sh\r
5\r
6# settings\r
7use_cyclone = 1\r
8#use_musashi = 1\r
9use_drz80 = 1\r
10use_sh2drc = 1\r
11#use_sh2mame = 1\r
12\r
13asm_memory = 1\r
14asm_render = 1\r
15asm_ym2612 = 1\r
16asm_misc = 1\r
17asm_cdpico = 1\r
18asm_cdmemory = 1\r
19#profile = 1\r
20#drc_debug = 3\r
21\r
22-include Makefile.local\r
23\r
24ifeq "$(use_musashi)" "1"\r
25# due to CPU stop flag acces\r
26asm_cdpico = 0\r
27asm_cdmemory = 0\r
28endif\r
29\r
30ARCH = arm\r
31DEFINES += ARM PANDORA IN_EVDEV\r
32CFLAGS += -I../.. -I. -I$(LIBROOT)/include\r
33CFLAGS += -Wall -Winline -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a\r
34ifeq ($(DEBUG),)\r
35CFLAGS += -O2 -fomit-frame-pointer -fstrict-aliasing -ffast-math\r
36endif\r
37LDFLAGS += -L$(LIBROOT)/lib -Wl,-Bstatic -lpng -Wl,-Bdynamic -lm -lpthread -ldl\r
38ASFLAGS = -mcpu=cortex-a8\r
39CC = $(CROSS)gcc\r
40STRIP = $(CROSS)strip\r
41AS = $(CROSS)as\r
42LD = $(CROSS)ld\r
43OBJCOPY = $(CROSS)objcopy\r
44\r
45# frontend\r
46OBJS += plat.o asm_utils.o\r
47\r
48# common\r
49OBJS += platform/common/emu.o platform/common/menu.o platform/common/fonts.o platform/common/config.o \\r
50 platform/common/arm_utils.o platform/common/mp3_helix.o platform/common/arm_linux.o \\r
51 platform/common/readpng.o platform/common/input.o platform/common/main.o platform/common/mp3.o \\r
52 platform/linux/fbdev.o platform/linux/in_evdev.o platform/linux/sndout_oss.o \\r
53 platform/linux/plat.o platform/linux/oshide.o\r
54\r
55# ARM stuff\r
56OBJS += pico/carthw/svp/compiler.o pico/carthw/svp/stub_arm.o\r
57OBJS += pico/sound/mix_arm.o\r
58\r
59# zlib\r
60OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \\r
61 zlib/deflate.o zlib/crc32.o zlib/adler32.o zlib/zutil.o zlib/compress.o\r
62# unzip\r
63OBJS += unzip/unzip.o unzip/unzip_stream.o\r
64\r
65vpath %.c = ../..\r
66vpath %.s = ../..\r
67vpath %.S = ../..\r
68DIRS += platform/linux zlib unzip\r
69\r
70all: mkdirs PicoDrive picorestore\r
71\r
72include ../common/common.mak\r
73include ../common/common_arm.mak\r
74include ../common/revision.mak\r
75\r
76CFLAGS += $(addprefix -D,$(DEFINES))\r
77\r
78PicoDrive : $(OBJS) ../common/helix/$(CROSS)helix-mp3.a\r
79 @echo ">>>" $@\r
80 $(CC) -o $@ $(CFLAGS) $^ $(LDFLAGS) -Wl,-Map=PicoDrive.map\r
81ifeq ($(DEBUG),)\r
82 $(STRIP) $@\r
83endif\r
84\r
85clean: tidy\r
86 $(RM) PicoDrive\r
87tidy:\r
88 $(RM) $(OBJS)\r
89\r
90readme.txt: ../../tools/textfilter ../base_readme.txt\r
91 ../../tools/textfilter ../base_readme.txt $@ PANDORA\r
92\r
93PicoDrive.pxml: PicoDrive.pxml.template\r
94 ./make_pxml.sh PicoDrive.pxml.template PicoDrive.pxml\r
95\r
96platform/common/menu.o: menu.c\r
97\r
98# ----------- release -----------\r
99\r
100VER = $(shell head -n 1 version.h | sed 's/.*"\(.*\)\.\(.*\)".*/\1\2/g')\r
101\r
102rel: PicoDrive PicoDrive.run picorestore ../../pico/carthw.cfg readme.txt \\r
103 skin PicoDrive.png PicoDrive_p.png PicoDrive.pxml\r
104 rm -rf out\r
105 mkdir out\r
106 cp -r $^ out/\r
107 $(PND_MAKE) -p PicoDrive_$(VER).pnd -d out -x PicoDrive.pxml -i PicoDrive.png -c\r