summaryrefslogtreecommitdiffstats
path: root/stone_soup/crawl-ref/source/makefile.osx
blob: 7cee7c3452eee9c193ace116f34bd9197b2c3c93 (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
# -*- Makefile -*- for Dungeon Crawl

#
# 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 = OSX

CFLAGS = -Wall -Werror -D$(OS_TYPE) $(EXTRA_FLAGS)

MCHMOD = 711 
INSTALLDIR = /tmp/CRAWLTEST/testdev
LIB = -lncurses -lstdc++

all: $(GAME)

install: $(GAME) 
	$(COPY) $(GAME) ${INSTALLDIR}
	${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)

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} $(INCLUDES) -c $< ${INCLUDE}

.h.cc:  
	touch $@