-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
executable file
·83 lines (57 loc) · 1.35 KB
/
Makefile
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
73
74
75
76
77
78
79
80
81
82
83
#####################################
#
# Standard Makefile for BlitzKrieg
# designed by [email protected]
#
#####################################
NAME=firestarter
# Compiler
CXX=g++
# Mingw location
MINGW=c:/mingw/
# Compiler options
WIN32=1
DEBUGMODE=1
### Warn mode
WFLAGS = -Wall -W -Werror -Wno-unused -fmessage-length=0
CFLAGS = $(WFLAGS) -MMD -DXP_WIN -D_WINDOWS -DWIN32 -D_MINGW
ifdef DEBUGMODE
CFLAGS += -DDEBUGMODE=$(DEBUGMODE) -DDEBUG=1 -g
DEBUG_DIR=_debug
else
CFLAGS += $(OFLAGS)
DEBUG_DIR=
endif
### Libraries
LIBDIR =
LIBS = -laldmb -ldumb -lldpng -lpng -lz -lalleg
ifdef WIN32
RM = rm -rf
PATH_SEP = "\\"
EXE = .exe
else
RM = rm -rf
PATH_SEP = /
EXE =
endif
### Get OBJS
include Makefile.lst
.PHONY: all test clean
first: test
all: $(NAME)$(DEBUG_DIR)$(EXE) editor$(EXE)
test: $(NAME)$(DEBUG_DIR)$(EXE)
$(NAME)$(DEBUG_DIR)$(EXE)
src/Data.h: data/fonts.dat
c:\allegro\tools\dat -h $@ -p DATA_FONTS_ $^
$(NAME)$(DEBUG_DIR)$(EXE): $(OBJS)
$(CXX) $(OBJS) -o $@ -mwindows $(LIBDIR) $(LIBS)
editor$(EXE): $(EDITOR_OBJS)
$(CXX) $(EDITOR_OBJS) -o $@ $(LIBDIR) $(LIBS)
-include $(addprefix objs$(DEBUG_DIR)/,$(addsuffix .d,$(notdir $(MODULES) $(JS_MODULES))))
objs$(DEBUG_DIR)/%.o: src/%.cpp src/%.h
@echo _
$(CXX) -c $< -o $@ $(CFLAGS)
clean:
$(RM) $(NAME)$(EXE)
$(RM) objs$(DEBUG_DIR)/*.d
$(RM) objs$(DEBUG_DIR)/*.o