tweaking pandora frontend
[picodrive.git] / platform / win32 / Makefile
... / ...
CommitLineData
1# settings
2CROSS=i586-mingw32msvc-
3
4#use_musashi = 1
5use_fame = 1
6use_cz80 = 1
7use_sh2drc = 1
8#use_sh2mame = 1
9
10-include Makefile.local
11
12ARCH ?= x86
13CC = $(CROSS)gcc
14CXX = $(CROSS)g++
15LD = $(CROSS)ld
16STRIP = $(CROSS)strip
17
18DEFINES = _UNZIP_SUPPORT IN_VK
19CFLAGS += -O2 -Wall -falign-functions=2 -ffast-math
20CFLAGS += -I../.. -I. -I../../zlib/ -Idirectx/include/
21LDFLAGS += -mwindows -L. -Ldirectx/lib/ -lgdi32 -lcomdlg32 -lddraw -ldsound -ldxguid
22
23# frontend
24OBJS += main.o plat.o direct.o dsnd.o in_vk.o
25
26# common
27OBJS += platform/common/emu.o platform/common/menu.o \
28 platform/common/config.o platform/common/fonts.o platform/common/readpng.o \
29 platform/common/input.o
30
31OBJS += pico/carthw/svp/compiler.o
32OBJS += pico/sound/mix.o
33# zlib
34OBJS += zlib/gzio.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o \
35 zlib/deflate.o zlib/crc32.o zlib/adler32.o zlib/zutil.o zlib/compress.o zlib/uncompr.o
36# unzip
37OBJS += unzip/unzip.o unzip/unzip_stream.o
38
39CFLAGS += $(addprefix -D,$(DEFINES))
40CXXFLAGS = $(CFLAGS)
41
42vpath %.c = ../..
43
44DIRS += zlib unzip
45
46TARGET = PicoDrive.exe
47all: mkdirs $(TARGET)
48
49include ../common/common.mak
50include ../common/revision.mak
51
52clean: tidy
53 @$(RM) $(TARGET)
54tidy:
55 $(RM) $(OBJS) $(TARGET).map
56 rm -rf $(DIRS)
57
58$(TARGET) : $(OBJS)
59 @echo ">>>" $@
60 $(CC) $(CFLAGS) $^ $(LDFLAGS) -lm -lpng -Wl,-Map=$(TARGET).map -o $@
61 $(STRIP) $@
62
63# ----------- release -----------
64ifneq ($(findstring rel,$(MAKECMDGOALS)),)
65ifeq ($(VER),)
66$(error need VER)
67endif
68endif
69
70rel: $(TARGET) readme.txt carthw.cfg
71 zip -9 -j ../../PicoDrive_win32_$(VER).zip $^
72