X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=babel%2Fbabel-makefile;fp=babel%2Fbabel-makefile;h=1b318873272f93990c66ed8f537c76bbb3a4c88a;hb=fb72f54c425e715d804b6b90cd3f622c81dcd050;hp=0000000000000000000000000000000000000000;hpb=7eda771842a214ee6c9b60aee0a982253fcc29e6;p=projects%2Fchimara%2Fchimara.git diff --git a/babel/babel-makefile b/babel/babel-makefile new file mode 100644 index 0000000..1b31887 --- /dev/null +++ b/babel/babel-makefile @@ -0,0 +1,75 @@ +# provisional makefile for babel +# +# Note that to compile babel, it is necessary only to compile all the .c +# files in this distribution and link them. +# +# This makefile is provided purely as a convenience. +# +# The following targets are available: +# babel: make babel +# babel.lib: make babel handler library (for Borland) +# ifiction.lib: make babel ifiction library (for Borland) +# babel.a: make babel handler library (for gcc) +# ifiction.a: make babel ifiction library (for gcc) +# dist: make babel.zip, the babel source distribution +# +# Note that this is a GNU makefile, and may not work with other makes +# +# Comment/uncomment the following lines to make the program work + +#CC=bcc32 +#OBJ=.obj +#BABEL_LIB=babel.lib +#IFICTION_LIB=ifiction.lib +#BABEL_FLIB=babel_functions.lib +#OUTPUT_BABEL= + +CC=gcc -g +OBJ=.o +BABEL_LIB=babel.a +BABEL_FLIB=babel_functions.a +IFICTION_LIB=ifiction.a +OUTPUT_BABEL=-o babel + +treaty_objs = zcode${OBJ} magscrolls${OBJ} blorb${OBJ} glulx${OBJ} hugo${OBJ} agt${OBJ} level9${OBJ} executable${OBJ} advsys${OBJ} tads${OBJ} tads2${OBJ} tads3${OBJ} adrift${OBJ} alan${OBJ} +bh_objs = babel_handler${OBJ} register${OBJ} misc${OBJ} md5${OBJ} ${treaty_objs} +ifiction_objs = ifiction${OBJ} register_ifiction${OBJ} +babel_functions = babel_story_functions${OBJ} babel_ifiction_functions${OBJ} babel_multi_functions${OBJ} +babel_objs = babel${OBJ} $(BABEL_FLIB) $(IFICTION_LIB) $(BABEL_LIB) + +babel: ${babel_objs} + ${CC} ${OUTPUT_BABEL} ${babel_objs} + +%${OBJ} : %.c + ${CC} -c $^ + +register${OBJ}: modules.h + +babel.lib: ${foreach dep,${bh_objs},${dep}.bl} + +ifiction.lib: ${foreach dep,${ifiction_objs},${dep}.il} + +babel_functions.lib: ${foreach dep,${babel_functions},${dep}.fl} + +%.obj.bl: %.obj + tlib babel.lib +-$^ + echo made > $@ + +%.obj.il: %.obj + tlib ifiction.lib +-$^ + echo made > $@ +%.obj.fl: %.obj + tlib babel_functions.lib +-$^ + echo made > $@ + +babel.a: $(bh_objs) + ar -r babel.a $^ + +ifiction.a: $(ifiction_objs) + ar -r ifiction.a $^ + +babel_functions.a: $(babel_functions) + ar -r babel_functions.a $^ + +dist: + cut -c0-31 MANIFEST | zip babel.zip -@