forked from theyamo/CheeseCutter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.mingw
75 lines (54 loc) · 1.68 KB
/
Makefile.mingw
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
COMFLAGS=-m32
LIBS=-lstdc++
DLINK=$(COMFLAGS) -Wl,--gc-sections
VERSION=$(shell cat Version)
DFLAGS=$(COMFLAGS) -I./src -J./src/c64 -J./src/font -O1
CFLAGS=$(COMFLAGS) -O1
CXXFLAGS=$(CFLAGS) -I./src -O3
COMPILE.d = $(DC) $(DFLAGS) -c -o $@
COMPILE.c = $(CC) $(CFLAGS) -c -o $@
DC=gdc
CXX=g++
CC=gcc
EXE=.exe
TARGET=ccutter
include Makefile.objects.mk
$(TARGET): $(C64OBJS) $(OBJS) $(CXX_OBJS)
$(DC) $(DLINK) -mwindows -o $(TARGET) $(OBJS) $(CXX_OBJS) $(LIBS)
ct2util: $(C64OBJS) $(UTILOBJS)
$(DC) $(DLINK) -o $@ $(UTILOBJS) $(LIBS)
.cpp.o : $(CXX_SRCS)
$(CXX) $(CXXFLAGS) -c $< -o $@
.c.o : $(C_SRCS)
$(CC) -c $< -o $@
ct: $(C64OBJS) $(CTOBJS)
c64: $(C64OBJS)
all: c64 $(OBJS) $(CXX_OBJS) ct2util ct $(TARGET)
# release version with additional optimizations
# release: DFLAGS += -frelease -fno-bounds-check
release: all
strip ccutter$(EXE)
strip ct2util$(EXE)
# development release pulled from git master
devrelease: DFLAGS += -fversion=DEV
devrelease: all
zip cheesecutter-devbuild-win32.zip $(DIST_FILES)
zip -j cheesecutter-devbuild-win32.zip ../*.dll
dist: release
zip cheesecutter-$(VERSION)-win32.zip $(DIST_FILES)
clean:
rm -f *.o *~ resid/*.o resid-fp/*.o ccutter ct2util \
$(C64OBJS) $(OBJS) $(CTOBJS) $(CXX_OBJS) $(UTILOBJS) $(C_OBJS)
dclean: clean
rm -rf dist
rm -rf CheeseCutter.app
rm -rf CheeseCutter_$(VERSION).dmg
tar:
git archive master --prefix=cheesecutter-$(VERSION)/ | bzip2 > cheesecutter-$(VERSION)-src.tar.bz2
# --------------------------------------------------------------------------------
src/c64/player.bin: src/c64/player_v4.acme
acme -f cbm --outfile $@ $<
src/ct/base.o: src/c64/player.bin
src/ui/ui.o: src/ui/help.o
%.o: %.d
$(COMPILE.d) $<