summaryrefslogtreecommitdiffstats
path: root/stone_soup/crawl-ref/source/makefile.bsd
blob: 9e10d1ebf881ffdbfdb9a716d1629ecaea1ad277 (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
# -*- Makefile -*- for Dungeon Crawl (BSD)

#
# 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 = BSD
CFLAGS = -Wall -D$(OS_TYPE) $(EXTRA_FLAGS)
LDFLAGS = -static -L/usr/lib
MCHMOD = 711
# INSTALLDIR = /usr/games
INSTALLDIR = /tmp/CRAWLTEST/testdev
LIB = -lncurses

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)
	strip $(GAME)
	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 $@