summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/makefile.sol
blob: e79d7e3a5307db13225d5e3cd384910e4b07787f (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
# Make file for Dungeon Crawl (solaris)

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

APPNAME = 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
GROUP = games
MOVE = mv
OS_TYPE = SOLARIS

CFLAGS = -Wall -Wwrite-strings -Wstrict-prototypes \
            -Wmissing-prototypes -Wmissing-declarations \
            -g -D$(OS_TYPE) $(EXTRA_FLAGS)

LDFLAGS = -static
MCHMOD = 2755
INSTALLDIR = /opt/local/newcrawl/bin
LIB = -lcurses

all:            $(APPNAME)

install:        $(APPNAME)
		#strip $(APPNAME)
		$(MOVE) ${INSTALLDIR}/${APPNAME} ${INSTALLDIR}/${APPNAME}.old
		$(COPY) $(APPNAME) ${INSTALLDIR}
		chgrp ${GROUP} ${INSTALLDIR}/${APPNAME}
		chmod ${MCHMOD} ${INSTALLDIR}/$(APPNAME)

clean:
		$(DELETE) *.o

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


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

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

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

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

.h.cc:
		touch $@