blob: 7c683cd36909e248322acda8f6060009603e6b2d (
plain) (
blame)
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
|
# Make file for Dungeon Crawl (Win32, MinGW)
# this file contains a list of the libraries.
# it will make a variable called OBJECTS that contains all the libraries
include makefile.obj
ifeq ($(DEBUG_CRAWL),)
OPATH := rel
else
OPATH := dbg
endif
# need .exe so make will find the right file
APPNAME = $(OPATH)\crawl.exe
CXX = g++
DELETE = del
COPY = copy
OS_TYPE = WIN32CONSOLE
CFLAGS = -Wall -Wwrite-strings -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations \
-D$(OS_TYPE) $(EXTRA_FLAGS) -DCLUA_BINDINGS \
-DWINMM_PLAY_SOUNDS -DREGEX_PCRE
OBJECTS := $(OBJECTS) libw32c.o
OBJECTS := $(foreach file,$(OBJECTS),$(OPATH)/$(file))
LDFLAGS =
INSTALLDIR = .
#LIB = -lcurso -lpano
LIB = -lwinmm -static -lpcre -llua -llualib
all: $(APPNAME)
prepare:
if not exist $(OPATH) mkdir $(OPATH)
install: $(APPNAME)
$(COPY) $(APPNAME) ${INSTALLDIR}
clean:
$(DELETE) $(OPATH)\*.o
distclean:
$(DELETE) $(OPATH)\*.o
$(DELETE) *.o
$(DELETE) bones.*
$(DELETE) $(OPATH)\bones.*
$(DELETE) morgue.txt
$(DELETE) $(OPATH)\morgue.txt
$(DELETE) scores
$(DELETE) $(OPATH)\scores
$(DELETE) crawl.exe
$(DELETE) $(subst /,\,$(APPNAME))
$(DELETE) *.sav
$(DELETE) $(OPATH)\*.sav
$(DELETE) core
$(DELETE) $(OPATH)\core
$(DELETE) *.0*
$(DELETE) $(OPATH)\*.0*
$(DELETE) *.lab
$(DELETE) $(OPATH)\*.lab
$(APPNAME): prepare $(OBJECTS)
${CXX} ${LDFLAGS} $(INCLUDES) $(CFLAGS) $(OBJECTS) -o $(APPNAME) $(LIB)
strip $(APPNAME)
debug: prepare $(OBJECTS)
${CXX} ${LDFLAGS} $(INCLUDES) $(CFLAGS) $(OBJECTS) -o $(APPNAME) $(LIB)
profile: $(OBJECTS)
${CXX} -g -p ${LDFLAGS} $(INCLUDES) $(CFLAGS) $(OBJECTS) -o $(APPNAME) $(LIB)
$(OPATH)/%.o: %.cc
${CXX} ${CFLAGS} ${INCLUDES} -o $@ -c $<
|