-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathMakefile.w32
53 lines (37 loc) · 2.01 KB
/
Makefile.w32
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
# Makefile for Harris Windows build
# Warning! Doesn't track all dependencies, so call on a clean tree or use -B!
CC := i586-mingw32msvc-gcc
CFLAGS := -Wall -Wextra -Werror --std=gnu99 -fgnu89-inline -g -L. -Wfatal-errors
CPPFLAGS := -DWINDOWS
LIBS := -latg -lm
SDLFLAGS := `/usr/i586-mingw32msvc/bin/sdl-config --cflags` -I/usr/i586-mingw32msvc/include/SDL
SDL := `/usr/i586-mingw32msvc/bin/sdl-config --libs` -lSDL_ttf -lSDL_gfx -lSDL_image
INTEL_OBJS := intel_bombers.o intel_fighters.o intel_targets.o
SCREEN_OBJS := main_menu.o setup_game.o setup_difficulty.o setup_types.o load_game.o save_game.o control.o run_raid.o raid_results.o post_raid.o $(INTEL_OBJS) handle_crews.o
OBJS := globals.o weather.o bits.o rand.o geom.o widgets.o date.o history.o routing.o saving.o render.o events.o ui.o load_data.o dclass.o crew.o mods.o almanack.o $(SCREEN_OBJS)
INCLUDES := $(OBJS:.o=.h) types.h version.h
SAVES := save/qstart.sav save/civ.sav save/abd.sav save/ruhr.sav
all: harris.exe $(SAVES) dat/targets dat/cities/Saarbrucken.pbm dat/cities/Lubeck.pbm dat/cities/Peenemunde.pbm
harris.exe: harris.o $(OBJS)
$(CC) $(CFLAGS) $(CPPFLAGS) $(SDLFLAGS) $(OBJS) harris.o -o $@ $(LDFLAGS) $(LIBS) $(SDL)
harris.o: harris.c $(INCLUDES)
$(CC) $(CFLAGS) $(CPPFLAGS) $(SDLFLAGS) -o $@ -c $<
events.h: dat/events mkevents.py
./mkevents.py h >events.h
events.c: dat/events mkevents.py
./mkevents.py c >events.c
save/%.sav: save/%.sav.in gensave.py
./gensave.py --windows --salt $< <$< >$@
dat/targets: FORCE
sed -i dat/targets -e 's/ö/o/g' -e 's/ü/u/g' -e 's/Ø/O/g'
dat/locations: FORCE
sed -i dat/locations -e 's/ö/o/g' -e 's/ü/u/g' -e 's/è/e/g'
dat/cities/Saarbrucken.pbm: dat/cities/Saarbrücken.pbm
cp dat/cities/Saarbrücken.pbm dat/cities/Saarbrucken.pbm
dat/cities/Lubeck.pbm: dat/cities/Lübeck.pbm
cp dat/cities/Lübeck.pbm dat/cities/Lubeck.pbm
dat/cities/Peenemunde.pbm: dat/cities/Peenemünde.pbm
cp dat/cities/Peenemünde.pbm dat/cities/Peenemunde.pbm
%.o: %.c %.h
$(CC) $(CFLAGS) $(CPPFLAGS) $(SDLFLAGS) -o $@ -c $<
FORCE: