summaryrefslogtreecommitdiffstats
path: root/stone_soup/crawl-ref/source/makefile.mgw
diff options
context:
space:
mode:
Diffstat (limited to 'stone_soup/crawl-ref/source/makefile.mgw')
-rw-r--r--stone_soup/crawl-ref/source/makefile.mgw74
1 files changed, 74 insertions, 0 deletions
diff --git a/stone_soup/crawl-ref/source/makefile.mgw b/stone_soup/crawl-ref/source/makefile.mgw
new file mode 100644
index 0000000000..7c683cd369
--- /dev/null
+++ b/stone_soup/crawl-ref/source/makefile.mgw
@@ -0,0 +1,74 @@
+# Make file for Dungeon Crawl (Win32, MinGW)
+
+# this file contains a list of the libraries.
+# it will make a variable called OBJECTS that contains all the libraries
+include makefile.obj
+
+ifeq ($(DEBUG_CRAWL),)
+OPATH := rel
+else
+OPATH := dbg
+endif
+
+# need .exe so make will find the right file
+APPNAME = $(OPATH)\crawl.exe
+CXX = g++
+DELETE = del
+COPY = copy
+OS_TYPE = WIN32CONSOLE
+CFLAGS = -Wall -Wwrite-strings -Wstrict-prototypes \
+ -Wmissing-prototypes -Wmissing-declarations \
+ -D$(OS_TYPE) $(EXTRA_FLAGS) -DCLUA_BINDINGS \
+ -DWINMM_PLAY_SOUNDS -DREGEX_PCRE
+
+OBJECTS := $(OBJECTS) libw32c.o
+OBJECTS := $(foreach file,$(OBJECTS),$(OPATH)/$(file))
+
+LDFLAGS =
+INSTALLDIR = .
+#LIB = -lcurso -lpano
+LIB = -lwinmm -static -lpcre -llua -llualib
+
+all: $(APPNAME)
+
+prepare:
+ if not exist $(OPATH) mkdir $(OPATH)
+
+install: $(APPNAME)
+ $(COPY) $(APPNAME) ${INSTALLDIR}
+
+clean:
+ $(DELETE) $(OPATH)\*.o
+
+distclean:
+ $(DELETE) $(OPATH)\*.o
+ $(DELETE) *.o
+ $(DELETE) bones.*
+ $(DELETE) $(OPATH)\bones.*
+ $(DELETE) morgue.txt
+ $(DELETE) $(OPATH)\morgue.txt
+ $(DELETE) scores
+ $(DELETE) $(OPATH)\scores
+ $(DELETE) crawl.exe
+ $(DELETE) $(subst /,\,$(APPNAME))
+ $(DELETE) *.sav
+ $(DELETE) $(OPATH)\*.sav
+ $(DELETE) core
+ $(DELETE) $(OPATH)\core
+ $(DELETE) *.0*
+ $(DELETE) $(OPATH)\*.0*
+ $(DELETE) *.lab
+ $(DELETE) $(OPATH)\*.lab
+
+$(APPNAME): prepare $(OBJECTS)
+ ${CXX} ${LDFLAGS} $(INCLUDES) $(CFLAGS) $(OBJECTS) -o $(APPNAME) $(LIB)
+ strip $(APPNAME)
+
+debug: prepare $(OBJECTS)
+ ${CXX} ${LDFLAGS} $(INCLUDES) $(CFLAGS) $(OBJECTS) -o $(APPNAME) $(LIB)
+
+profile: $(OBJECTS)
+ ${CXX} -g -p ${LDFLAGS} $(INCLUDES) $(CFLAGS) $(OBJECTS) -o $(APPNAME) $(LIB)
+
+$(OPATH)/%.o: %.cc
+ ${CXX} ${CFLAGS} ${INCLUDES} -o $@ -c $<