-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
52 lines (43 loc) · 1.72 KB
/
Makefile.in
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
#
# RPG makefile
#
# run "make" to compile the RPG and RPG Edit
# run "make remake" to recompile everything
# run "make clean" to clean up the object files
#
CC := @cc@
CPPFLAGS := @cppflags@
ENGINE_EXE := @engine_exe@
EDITOR_EXE := @editor_exe@
COMMON_OBJS := $(patsubst %.cpp, %.o, $(wildcard src/shared/*.cpp))
EDITOR_OBJS := $(patsubst %.cpp, %.o, $(wildcard src/editor/*.cpp))
ENGINE_OBJS := $(patsubst %.cpp, %.o, $(wildcard src/*.cpp))
COMMON_LIBS := @libs@
ENGINE_LIBS := @libs_engine@
DATA_LUA := $(wildcard data/scripts/*.lua)
DATA_BMP := $(wildcard data/bitmaps/*.bmp wildcard data/bitmaps/*.tga)
DATA_FONT := $(wildcard data/bitmaps/font_*.*)
DATA_MAP := $(wildcard data/maps/*.map)
DATA_SAMPS := $(wildcard data/samples/*.wav)
DATA_MIDIS := $(wildcard data/music/*.mid)
.PHONY: default remake clean
default: $(ENGINE_EXE) $(EDITOR_EXE)
remake: clean default
clean:
rm -f src/*.o src/editor/*.o src/shared/*.o
%.o: %.cpp
$(CC) $(CPPFLAGS) -c $< -o $@
$(ENGINE_EXE): $(COMMON_OBJS) $(ENGINE_OBJS)
$(CC) $(CPPFLAGS) -o $(ENGINE_EXE) $(COMMON_OBJS) $(ENGINE_OBJS) $(ENGINE_LIBS) $(COMMON_LIBS)
$(EDITOR_EXE): $(COMMON_OBJS) $(EDITOR_OBJS)
$(CC) $(CPPFLAGS) -o $(EDITOR_EXE) $(COMMON_OBJS) $(EDITOR_OBJS) $(COMMON_LIBS)
# Recreate data.dat
data.dat: $(DATA_LUA) $(DATA_BMP) $(DATA_FONT) $(DATA_MAP) $(DATA_SAMPS) $(DATA_MIDIS)
rm -vf data.dat
dat -a -t BMP -c0 -k data.dat data/bitmaps/*.bmp
dat -a -t BMP -c0 -k data.dat data/bitmaps/*.tga
dat -a -t FONT -c0 -k data.dat data/bitmaps/font_*.pcx
dat -a -t LUA -c0 -k data.dat data/scripts/*.lua
dat -a -t MAP -c0 -k data.dat data/maps/*.map
dat -a -t SAMP -c0 -k data.dat data/samples/*.wav
if test -n "$$DATA_MIDIS"; then dat -a -t MIDI -c0 -k data.dat $$DEMIDIS; fi;