# By default, just typing GMAKE will compile the target with debugging turned # on. # GMAKE REL will compile with debugging off # GMAKE ABBREV will compile a release version and turn on abbreviations. It # also dumps out the compilation statistics. # # Things you might need to change to get it to work on your system: # ROOTDIR if your Inform compiler isn't on your root drive. # INFRMROOT to point to the root of your Inform installation # TARGET to the name of your main executable # # I've also included a MAX_OBJECTS definition, mainly to illustrate how to # properly pass $ commands to Inform through the makefile. # # All these flags are located near the beginning of the file to make them easy # to change. # Modify the line below (and uncomment it) if your Inform executable is not on # your root drive # ROOTDIR=C: # Modify this line to point to your Inform directory # INFRMROOT=/usr/local/inform INFRMROOT=$(ROOTDIR)/util/if/inform # Change this to match the name of your main source file TARGET=mygame1 # Uncomment the line below if you have any custom .h files for your game and # you want make to recompile the target if the .h files change # DEPS=mygame1.h # Uncomment the line below if you want to compile to V8 # V8=1 # Change the line below if you need more than 640 objects (default) # If you intend to leave it at 640, you can leave it commented out # OBJ_FLAG=\$$MAX_OBJECTS=640 # Library and include directory settings LIBDIR=$(INFRMROOT)/Lib/Zcode CONTRIBDIR=$(INFRMROOT)/Lib/Contrib INFRM=$(LIBDIR)/infrmw32.exe #INFRM definition for Linux machine #INFRM=$(LIBDIR)/inform ifdef V8 FLAGS=-v8 $(OBJ_FLAG) else FLAGS=-v5 $(OBJ_FLAG) endif # see top of file for explanation of default settings DBGFLAGS=-S $(FLAGS) RELFLAGS=-~S -~D -~X $(FLAGS) ABBREVFLAGS=$(RELFLAGS) -e -s INCLUDE=+include_path=./,$(LIBDIR),$(CONTRIBDIR) RM=del /q #RM definition for Linux machine #RM=rm -f SRCS=$(TARGET).inf ifdef V8 REALTARGET = $(TARGET).z8 else REALTARGET = $(TARGET).z5 endif $(TARGET) : $(REALTARGET) $(REALTARGET) : $(SRCS) $(DEPS) $(INFRM) $(DBGFLAGS) $(INCLUDE) $(SRCS) rel: release release: $(TARGET).inf $(INFRM) $(RELFLAGS) $(INCLUDE) $(TARGET).inf abbrev: $(TARGET).inf $(INFRM) $(ABBREVFLAGS) $(INCLUDE) $(TARGET).inf clean: -$(RM) $(TARGET).z5 $(TARGET).z8