- #
- # FILE
- #
- # Makefile Makefile for dbug package
- #
- # SCCS ID
- #
- # @(#)Makefile 2.00 87.10.27
- #
- # DESCRIPTION
- #
- # Makefile for the dbug package (under UNIX system V or 4.2BSD).
- #
- # Interesting things to make are:
- #
- # lib => Makes the runtime support library in the
- # current directory.
- #
- # lintlib => Makes the lint library in the current directory.
- #
- # install => Install pieces from current directory to
- # where they belong.
- #
- # doc => Makes the documentation in the current
- # directory.
- #
- # clean => Remove temporary files, etc from
- # current directory.
- #
- # superclean => Remove everything except sccs source files.
- #include "Makefile.h" # Include system-dependent variabels
- CFLAGS = $(CC_FLAGS)
- EXAMPLES = example1.r example2.r example3.r
- OUTPUTS = output1.r output2.r output3.r output4.r output5.r
- OBJECTS = dbug.obj sanity.obj
- NAME = dbug
- INCFILE = ${NAME}.h
- GFLAGS = -s
- CCLIB = CC_LIB_FLAG CC_STACK(8000) dbug.lib strings.lib
- #
- # The default thing to do is remake the local runtime support
- # library, local lint library, and local documentation as
- # necessary.
- #
- all: LH(${INCFILE}) L(${NAME}) $(OUTPUTS) doc LB(EX(dbug_ana))
- init: superclean quick
- quick: comp_all all
- comp_all:; $(CC) $(CFLAGS) -c *.c
- LH(${INCFILE}): ${INCFILE}
- LN($(@F),$@)
- L(${NAME}): ${OBJECTS}
- $(RM) L(${NAME})
- AR(L(${NAME})) CMD_FILE(@lib)
- EX(dbug_ana): dbug_ana.obj L(${NAME})
- $(CC) CC_OUT($@) dbug_ana.obj $(CCLIB) $(CCLIB_EXTRA)
- LB(EX(dbug_ana)): EX(dbug_ana)
- LN(EX(dbug_ana),$@)
- doc: factoria.exe
- #
- # Clean up the local directory.
- #
- clean:; RM(HELPTEMPS EX(factoria) *.out)
- superclean:; RM(DIVTEMPS EX(factoria) EX(dbug_ana) *.out *.r)
- # Make the test/example program "factoria".
- #
- # Note that the objects depend on the LOCAL dbug.h file and
- # the compilations are set up to find dbug.h in the current
- # directory even though the sources have "#include <dbug.h>".
- # This allows the examples to look like the code a user would
- # write but still be used as test cases for new versions
- # of dbug.
- factoria.exe: main.obj factoria.obj L(${NAME})
- $(CC) CC_OUT($@) main.obj factoria.obj $(CCLIB) $(CCLIB_EXTRA)
- main.obj: main.c dbug.h
- $(CC) $(CC_DBUG_FLAGS) -c main.c
- factoria.obj: factoria.c dbug.h
- $(CC) $(CC_DBUG_FLAGS) -c factoria.c
- #
- # Run the factoria program to produce the sample outputs.
- #
- output1.r: factoria.exe
- factoria 1 2 3 4 5 > $@
- output2.r: factoria.exe
- factoria -#t:o 2 3 >$@
- output3.r: factoria.exe
- factoria -#d:t:o 3 >$@
- output4.r: factoria.exe
- factoria -#d,result:o 4 >$@
- output5.r: factoria.exe
- factoria -#d:f,factorial:F:L:o 3 >$@