1# -*- Makefile -*- for Dungeon Crawl (OS X) 2 3#APPNAME = crawl 4GAME = crawl 5 6# this file contains a list of the libraries. 7# it will make a variable called OBJECTS that contains all the libraries 8include makefile.obj 9 10OBJECTS += liblinux.o 11 12CXX = g++ 13DELETE = rm -f 14COPY = cp 15OS_TYPE = BSD 16 17CFLAGS = -D$(OS_TYPE) -DOSX $(EXTRA_FLAGS) -Wall -Werror \ 18 -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \ 19 -Wmissing-declarations 20 21LDFLAGS = -L/sw/lib -L/usr/lib 22MCHMOD = 711 23# INSTALLDIR = /usr/games 24INSTALLDIR = /tmp/CRAWLTEST/testdev 25LIB = -lncurses -lstdc++ 26 27# Include for Fink's version of curses 28INCLUDES = -I/sw/include 29 30all: $(GAME) 31 32install: $(GAME) 33 $(COPY) $(GAME) ${INSTALLDIR} 34 ${MCHMOD} ${INSTALLDIR}/$(GAME) 35 36clean: 37 $(DELETE) *.o 38 39distclean: 40 $(DELETE) *.o 41 $(DELETE) bones.* 42 $(DELETE) morgue.txt 43 $(DELETE) scores 44 $(DELETE) $(GAME) 45 $(DELETE) *.sav 46 $(DELETE) core 47 $(DELETE) *.0* 48 $(DELETE) *.lab 49 50 51$(GAME): $(OBJECTS) 52 ${CXX} ${LDFLAGS} $(INCLUDES) $(CFLAGS) $(OBJECTS) -o $(GAME) $(LIB) 53 strip $(GAME) 54 chmod ${MCHMOD} $(GAME) 55 56debug: $(OBJECTS) 57 ${CXX} ${LDFLAGS} $(INCLUDES) $(CFLAGS) $(OBJECTS) -o $(GAME) $(LIB) 58 59profile: $(OBJECTS) 60 ${CXX} -g -p ${LDFLAGS} $(INCLUDES) $(CFLAGS) $(OBJECTS) -o $(GAME) $(LIB) 61 62.cc.o: 63 ${CXX} ${CFLAGS} $(INCLUDES) -c $< ${INCLUDE} 64 65.h.cc: 66 touch $@ 67 68