diff options
Diffstat (limited to 'trunk/source/makefile.osx')
-rw-r--r-- | trunk/source/makefile.osx | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/trunk/source/makefile.osx b/trunk/source/makefile.osx new file mode 100644 index 0000000000..9fa48a3b63 --- /dev/null +++ b/trunk/source/makefile.osx @@ -0,0 +1,67 @@ +# -*- Makefile -*- for Dungeon Crawl (OS X) + +#APPNAME = crawl +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 += liblinux.o + +CXX = g++ +DELETE = rm -f +COPY = cp +OS_TYPE = BSD + +CFLAGS = -D$(OS_TYPE) -DOSX $(EXTRA_FLAGS) -Wall -Werror \ + -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \ + -Wmissing-declarations + +LDFLAGS = -L/sw/lib -L/usr/lib +MCHMOD = 711 +# INSTALLDIR = /usr/games +INSTALLDIR = /tmp/CRAWLTEST/testdev +LIB = -lncurses -lstdc++ + +# Include for Fink's version of curses +INCLUDES = -I/sw/include + +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) + 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} $(INCLUDES) -c $< ${INCLUDE} + +.h.cc: + touch $@ + |