summaryrefslogtreecommitdiffstats
path: root/stone_soup/crawl-ref/source/makefile.lnx
blob: 8b8b8994fd2420307a1447fb500af4a2313bcad2 (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
# -*- Makefile -*- for Dungeon Crawl (linux)

#
# Modified for Crawl Reference by $Author$ on $Date$
#

GAME = crawl

# this file contains a list of the libraries.
# it will make a variable called OBJECTS that contains all the libraries
include makefile.obj

OBJECTS += libunix.o

CXX = g++
DELETE = rm -f
COPY = cp
OS_TYPE = LINUX

CFLAGS = -Wall -Wwrite-strings -fsigned-char \
            -g -D$(OS_TYPE) $(EXTRA_FLAGS)

MCHMOD = 2755

# [dshaligram] More common location than /opt/crawl/bin - this is from the
# Debian patch.
INSTALLDIR = /usr/games
LIB = -lncurses

# Include for Linux
INCLUDES = -I/usr/include/ncurses

all: $(GAME)

install: $(GAME)
	$(COPY) $(GAME) ${INSTALLDIR}
	chmod ${MCHMOD} ${INSTALLDIR}/$(GAME)

clean:
	$(DELETE) *.o

distclean:
	$(DELETE) *.o
	$(DELETE) bones.*
	$(DELETE) morgue.txt
	$(DELETE) scores
	$(DELETE) $(GAME)
	$(DELETE) *.sav
	$(DELETE) core
	$(DELETE) *.0*
	$(DELETE) *.lab


$(GAME): $(OBJECTS)
	${CXX} ${LDFLAGS} $(INCLUDES) $(CFLAGS) $(OBJECTS) -o $(GAME) $(LIB)
	chmod ${MCHMOD} $(GAME)

debug: $(OBJECTS)
	${CXX} ${LDFLAGS} $(INCLUDES) $(CFLAGS) $(OBJECTS) -o $(GAME) $(LIB)

profile:	$(OBJECTS)
	${CXX} -g -p ${LDFLAGS} $(INCLUDES) $(CFLAGS) $(OBJECTS) -o $(GAME) $(LIB)

.cc.o:
	${CXX} ${CFLAGS} -c $< ${INCLUDE}

.h.cc:
	touch $@