skip junk in mp3_helix, refactor find_sync_word
[picodrive.git] / platform / linux / Makefile
CommitLineData
cc68a136 1# settings
d08e7326 2#use_fbdev = 1
3#fake_in_gp2x = 1
4
d26dc685 5use_musashi = 1
6#use_fame = 1
f0d7b1fa 7use_cz80 = 1
679af8a3 8use_sh2drc = 1
f0d7b1fa 9#use_sh2mame = 1
10
80599a42 11#drc_debug = 3
f0d7b1fa 12#drc_debug_interp = 1
1fb0dd88 13#profile = 1
cc68a136 14
5686d931 15all: mkdirs PicoDrive
16
19e1d027 17-include Makefile.local
cc68a136 18
65c75cb0 19ifndef ARCH
20ARCH = x86
21endif
22
bcd94522 23DEFINES = _UNZIP_SUPPORT IO_STATS IN_EVDEV
697746df 24CFLAGS += -ggdb -Wall -falign-functions=2
19e1d027 25CFLAGS += -I../.. -I.
553c3eaa 26LDFLAGS += -lm -lpng
65c75cb0 27ifeq "$(ARCH)" "arm"
28CFLAGS += -mcpu=arm920t
29DEFINES += ARM
65c75cb0 30endif
31
5686d931 32CC ?= $(CROSS)gcc
cc68a136 33
34# frontend
697746df 35OBJS += io.o emu.o blit.o in_evdev.o plat.o sndout_oss.o log_io.o
e5f426aa 36
37# common
bcd94522 38OBJS += platform/common/main.o platform/common/emu.o platform/common/menu.o \
39 platform/common/config.o platform/common/fonts.o platform/common/readpng.o \
40 platform/common/input.o
e5f426aa 41
d08e7326 42ifeq "$(use_fbdev)" "1"
43DEFINES += FBDEV
44OBJS += fbdev.o
45else
46LDFLAGS += -lpthread
47LDFLAGS += -lX11
48endif
49
19e1d027 50ifeq "$(fake_in_gp2x)" "1"
51DEFINES += IN_GP2X FAKE_IN_GP2X
52OBJS += platform/gp2x/in_gp2x.o
697746df 53DIRS += platform/gp2x
19e1d027 54endif
55
65c75cb0 56ifeq "$(ARCH)" "arm"
57OBJS += pico/carthw/svp/stub_arm.o
58endif
697746df 59OBJS += pico/sound/mix.o
60OBJS += pico/carthw/svp/compiler.o
61
cc68a136 62# zlib
2445b7cb 63OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \
71de3cd9 64 zlib/deflate.o zlib/crc32.o zlib/adler32.o zlib/zutil.o zlib/compress.o zlib/uncompr.o
cc68a136 65# unzip
2445b7cb 66OBJS += unzip/unzip.o unzip/unzip_stream.o
cc68a136 67
2445b7cb 68vpath %.c = ../..
65c75cb0 69vpath %.s = ../..
70vpath %.S = ../..
679af8a3 71vpath %.asm = ../..
19e1d027 72
e05b81fc 73DIRS += platform/linux zlib unzip
cc68a136 74
f0d7b1fa 75include ../common/common.mak
697746df 76include ../common/revision.mak
77
78CFLAGS += $(addprefix -D,$(DEFINES))
f0d7b1fa 79
cc68a136 80clean: tidy
81 @$(RM) PicoDrive
82tidy:
2445b7cb 83 $(RM) $(OBJS)
84 rm -rf $(DIRS)
cc68a136 85 @make -C ../../cpu/mz80/ clean
86
94d2199e 87PicoDrive : $(OBJS)
03e4f2a3 88 @echo ">>>" $@
553c3eaa 89 $(CC) $(CFLAGS) $^ $(LDFLAGS) -Wl,-Map=PicoDrive.map -o $@
cc68a136 90
f6c49d38 91pprof: pprof.c
25eb407c 92 $(CROSS)gcc -O2 -ggdb -DPPROF -DPPROF_TOOL -I../../ -I. $^ -o $@
f6c49d38 93
679af8a3 94%.o : %.asm
95 @echo ">>>" $<
96 nasm -f elf $< -o $@
cc68a136 97