5267b71995-08-09Fredrik Hübinette (Hubbe) # This line is needed on some machines. @SET_MAKE@ # Don't change this line. Define EXTRALIBS before this line if you # wish to add any libraries. LIBS=@LIBS@ $(EXTRALIBS) # not used yet INSTALL=@INSTALL@ SRCDIR=@srcdir@ VPATH=@srcdir@ # These are used while compiling
5c8e891995-10-29Fredrik Hübinette (Hubbe) TMP_LIBDIR = @LIBDIR@ TMP_BINDIR = @BINDIR@ TMP_BUILDDIR = @BUILDDIR@
5683de1995-11-06Fredrik Hübinette (Hubbe) TMP_DOCDIR = @DOCDIR@
5267b71995-08-09Fredrik Hübinette (Hubbe)  prefix = @prefix@ exec_prefix = $(prefix)/bin lib_prefix = $(prefix)/lib/ulpc # # use bison please, yacc doesn't always work good enough. # YACC=@YACC@ YFLAGS=-d -v # If you don't have 'strchr', then add next flag to CFLAGS. # -Dstrchr=index -Dstrrchr=rindex # PROFIL= #PROFIL=-pg # #Enable warnings from the compiler, if wanted. # WARN=@WARN@ #WARN=-W -Wunused -Wformat #WARN -Wunused -Wformat -Wuninitialized #WARN= -Wall -Wshadow -Dlint #add extra defines here
dd66d41995-10-31Fredrik Hübinette (Hubbe) # Be sure to use -g and -DDEBUG when looking for bugs DEFINES=-DDEBUG -DDEFAULT_MASTER=\"$(lib_prefix)/master.lpc\"
5267b71995-08-09Fredrik Hübinette (Hubbe)  # -O should work with all compilers OPTIMIZE=@OPTIMIZE@ # Preprocessor flags. PREFLAGS=-I. -I$(SRCDIR) $(DEFINES) OTHERFLAGS=$(OSFLAGS) $(OPTIMIZE) $(WARN) $(PROFIL) CFLAGS=$(PREFLAGS) $(OTHERFLAGS) CC=@CC@ CPP=@CPP@ LD=$(CC) LDFLAGS=$(CFLAGS)
5c8e891995-10-29Fredrik Hübinette (Hubbe) RUNULPC=$(TMP_BUILDDIR)/ulpc -m $(TMP_LIBDIR)/master.lpc FIXDEP=$(RUNULPC) $(TMP_BINDIR)/fixdepends.lpc MAKE_FLAGS = "prefix=$(prefix)" "exex_prefix=$(exex_prefix)" "CC=$(CC)" "OTHERFLAGS=$(OTHERFLAGS)" "FIXDEP=$(FIXDEP)"
5267b71995-08-09Fredrik Hübinette (Hubbe)  # Add alloca.o if you don't have alloca() on your machine. # Add ualarm.o if you don't have ualarm() on your machine. #
2c4cec1996-04-13Fredrik Hübinette (Hubbe) OBJ=language.o peep.o add_efun.o array.o builtin_efuns.o backend.o \
5267b71995-08-09Fredrik Hübinette (Hubbe)  call_out.o docode.o dynamic_buffer.o error.o fd_control.o \ fsort.o hashtable.o interpret.o lex.o las.o list.o \ lpc_types.o main.o mapping.o memory.o module.o object.o \ opcodes.o operators.o port.o program.o rusage.o stralloc.o \
624d091996-02-24Fredrik Hübinette (Hubbe)  stuff.o svalue.o gc.o callback.o lpc_signal.o @EXTRA_OBJS@
5267b71995-08-09Fredrik Hübinette (Hubbe)  # MODULES=@subdirs@ MODULE_OBJS=@MODULE_OBJS@
5c8e891995-10-29Fredrik Hübinette (Hubbe) # # User callable targets #
5267b71995-08-09Fredrik Hübinette (Hubbe) 
5c8e891995-10-29Fredrik Hübinette (Hubbe) all: ulpc
5267b71995-08-09Fredrik Hübinette (Hubbe)  ulpc: $(OBJ) module_objects -mv ulpc ulpc.old $(LD) $(LDFLAGS) $(OBJ) $(MODULE_OBJS) -o ulpc $(LIBS)
5c8e891995-10-29Fredrik Hübinette (Hubbe)  # purify
5267b71995-08-09Fredrik Hübinette (Hubbe) pure: $(OBJ) module_objects -mv ulpc ulpc.old purify -free-queue-length=500 -inuse-at-exit=yes -chain-length=12 $(LD) $(LDFLAGS) $(OBJ) $(MODULE_OBJS) -o ulpc $(LIBS)
5c8e891995-10-29Fredrik Hübinette (Hubbe) # purecov
5267b71995-08-09Fredrik Hübinette (Hubbe) cover: $(OBJ) module_objects -mv ulpc ulpc.old purecov purify -free-queue-length=500 -inuse-at-exit=yes -chain-length=12 $(LD) $(LDFLAGS) $(OBJ) $(MODULE_OBJS) -o ulpc $(LIBS)
5c8e891995-10-29Fredrik Hübinette (Hubbe) # quantify
5267b71995-08-09Fredrik Hübinette (Hubbe) quant: $(OBJ) module_objects -mv ulpc ulpc.old quantify $(LD) $(LDFLAGS) $(OBJ) $(MODULE_OBJS) -o ulpc $(LIBS)
5c8e891995-10-29Fredrik Hübinette (Hubbe) # install
5267b71995-08-09Fredrik Hübinette (Hubbe) install: if [ ! -d "$(prefix)" ]; then mkdir "$(prefix)" ; chmod 755 "$(prefix)" ; fi if [ ! -d "$(exec_prefix)" ]; then mkdir "$(exec_prefix)" ; chmod 755 "$(exec_prefix)" ; fi $(INSTALL) ./ulpc $(exec_prefix) if [ ! -d "$(prefix)/lib" ]; then mkdir "$(prefix)/lib" ; chmod 755 "$(prefix)/lib" ; fi if [ ! -d "$(lib_prefix)" ]; then mkdir "$(lib_prefix)" ; chmod 755 "$(lib_prefix)" ; fi $(INSTALL) $(TMP_LIBDIR)/master.lpc $(lib_prefix) $(INSTALL) $(TMP_LIBDIR)/simulate.lpc $(lib_prefix)
5c8e891995-10-29Fredrik Hübinette (Hubbe) # tidy up a bit
5267b71995-08-09Fredrik Hübinette (Hubbe) tidy: -rm -f *.o core $(MUD_LIB)/core y.output y.tab.c y.tab.h -rm -f $(TMP_BINDIR)/core *.o *.i *.i~
5c8e891995-10-29Fredrik Hübinette (Hubbe) # make clean
5267b71995-08-09Fredrik Hübinette (Hubbe) clean: tidy
f90e541995-08-17Fredrik Hübinette (Hubbe)  -for a in $(MODULES) ; do ( cd $$a ; ${MAKE} $(MAKE_FLAGS) clean ) ; done
5267b71995-08-09Fredrik Hübinette (Hubbe)  -for a in $(MODULES) ; do rm -f $$a/*.o ; done
defd421996-04-23Fredrik Hübinette (Hubbe)  -rm -f TAGS tags
5267b71995-08-09Fredrik Hübinette (Hubbe)  -rm -f yacc.acts yacc.debug yacc.tmp *.debug.log a.out
5c8e891995-10-29Fredrik Hübinette (Hubbe) # make _really_ clean
5267b71995-08-09Fredrik Hübinette (Hubbe) spotless: clean rm -f Makefile machine.h find . -type f '(' -name '*~' -o -name '.*~' -o -name core -o -name '.nfs*' -name '#*#' ')' -print | xargs rm -f -rm -f lexical.c mon.out *.ln config.status -rm -f $(TMP_BINDIR)/driver $(TMP_BINDIR)/*~ $(TMP_BINDIR)/#*# -rm -f .pure driver* l.outa*
5c8e891995-10-29Fredrik Hübinette (Hubbe) # create tags
5267b71995-08-09Fredrik Hübinette (Hubbe) tags: ctags *.c TAGS: etags -t *.h *.c
5c8e891995-10-29Fredrik Hübinette (Hubbe) # verify / debug
44cdec1995-11-13Fredrik Hübinette (Hubbe) verify_manual:
5683de1995-11-06Fredrik Hübinette (Hubbe)  $(RUNULPC) $(SRCDIR)/test/verifymanual.lpc $(TMP_DOCDIR)
5267b71995-08-09Fredrik Hübinette (Hubbe) 
624d091996-02-24Fredrik Hübinette (Hubbe) verify: $(SRCDIR)/test/testsuite
44cdec1995-11-13Fredrik Hübinette (Hubbe)  $(RUNULPC) $(SRCDIR)/test/test_lpc.lpc $(SRCDIR)/test/testsuite
5c8e891995-10-29Fredrik Hübinette (Hubbe) # verify / debug verbose
624d091996-02-24Fredrik Hübinette (Hubbe) verbose_verify: $(SRCDIR)/test/testsuite
5683de1995-11-06Fredrik Hübinette (Hubbe)  $(RUNULPC) $(SRCDIR)/test/test_lpc.lpc $(SRCDIR)/test/testsuite --verbose
5267b71995-08-09Fredrik Hübinette (Hubbe) 
5c8e891995-10-29Fredrik Hübinette (Hubbe) # verify & debug VERBOSE
5683de1995-11-06Fredrik Hübinette (Hubbe) gdb_verify: $(SRCDIR)/test/testsuite
cb22561995-10-11Fredrik Hübinette (Hubbe)  echo >.gdbinit handle SIGUSR1 nostop noprint pass
5683de1995-11-06Fredrik Hübinette (Hubbe)  echo >>.gdbinit run -m $(TMP_LIBDIR)/master.lpc $(SRCDIR)/test/test_lpc.lpc $(SRCDIR)/test/testsuite -v -v -f
cb22561995-10-11Fredrik Hübinette (Hubbe)  gdb ./ulpc
5c8e891995-10-29Fredrik Hübinette (Hubbe)  # run hilfe, for interactive testing
cb22561995-10-11Fredrik Hübinette (Hubbe) run_hilfe:
5c8e891995-10-29Fredrik Hübinette (Hubbe)  $(RUNULPC) $(TMP_BINDIR)/hilfe
cb22561995-10-11Fredrik Hübinette (Hubbe) 
5c8e891995-10-29Fredrik Hübinette (Hubbe) # make export archive (requires compiled uLPC) # Do not compile in source tree if you want to use this!
defd421996-04-23Fredrik Hübinette (Hubbe) # Beware that export archive this includes bison/yacc/byacc source # and thus has to follow the rules stated in that code. export: $(SRCDIR)/test/testsuite new_peep_engine $(SRCDIR)/language.c $(SRCDIR)/language.h
ae0b381996-03-22Fredrik Hübinette (Hubbe)  chmod +x $(SRCDIR)/install-sh
5c8e891995-10-29Fredrik Hübinette (Hubbe)  $(RUNULPC) $(TMP_BINDIR)/export.lpc
defd421996-04-23Fredrik Hübinette (Hubbe) new_peep_engine: $(RUNULPC) $(TMP_BINDIR)/mkpeep.lpc $(SRCDIR)/peep.in >$(SRCDIR)/peep_engine.c
2c4cec1996-04-13Fredrik Hübinette (Hubbe) peep_engine.c: peep.in echo "" >$(SRCDIR)/peep_engine.c -$(RUNULPC) $(TMP_BINDIR)/mkpeep.lpc $(SRCDIR)/peep.in >$(SRCDIR)/peep_engine.c
5c8e891995-10-29Fredrik Hübinette (Hubbe) # make dependencies (requires compiled uLPC)
5267b71995-08-09Fredrik Hübinette (Hubbe) depend: language.c
5c8e891995-10-29Fredrik Hübinette (Hubbe)  gcc -MM $(PREFLAGS) *.c $(SRCDIR)/*.c | $(FIXDEP) $(SRCDIR)/Makefile.in
f90e541995-08-17Fredrik Hübinette (Hubbe)  for a in $(MODULES) ; do ( cd $$a ; ${MAKE} $(MAKE_FLAGS) depend ) ; done
5267b71995-08-09Fredrik Hübinette (Hubbe) 
bce86c1996-02-25Fredrik Hübinette (Hubbe) docs: mkdir docs html_docs: docs $(RUNULPC) $(TMP_BINDIR)/htmlify_docs $(TMP_DOCDIR) docs
5c8e891995-10-29Fredrik Hübinette (Hubbe) # # uLPC internal targets # module_objects: for a in $(MODULES) ; do ( cd $$a ; ${MAKE} $(MAKE_FLAGS) ) ; done lang.o: lang.c config.h object.h interpret.h program.h
defd421996-04-23Fredrik Hübinette (Hubbe) $(SRCDIR)/language.h: language.y
5c8e891995-10-29Fredrik Hübinette (Hubbe)  @echo "Expect 1 shift/reduce conflict." $(YACC) $(YFLAGS) $(SRCDIR)/language.y
defd421996-04-23Fredrik Hübinette (Hubbe)  mv y.tab.c $(SRCDIR)/language.c mv y.tab.h $(SRCDIR)/language.h
5c8e891995-10-29Fredrik Hübinette (Hubbe) 
defd421996-04-23Fredrik Hübinette (Hubbe) $(SRCDIR)/language.c: language.h touch $(SRCDIR)/language.c
5c8e891995-10-29Fredrik Hübinette (Hubbe)  module.c: modlist.h configure: configure.in cd $(SRCDIR) && autoconf config.status: configure ./config.status --recheck Makefile: Makefile.in config.status ./config.status machine.h: stamp-h stamp-h: machine.h.in config.status ./config.status modlist.h: ./config.status
5683de1995-11-06Fredrik Hübinette (Hubbe) $(SRCDIR)/test/testsuite: $(SRCDIR)/test/create_testsuite m4 <$(SRCDIR)/test/create_testsuite >$(SRCDIR)/test/testsuite
5c8e891995-10-29Fredrik Hübinette (Hubbe)  #Dependencies begin here, DO NOT REMOVE THIS LINE!!!! language.o: language.c global.h machine.h \
624d091996-02-24Fredrik Hübinette (Hubbe)  config.h \ port.h \ interpret.h \ program.h \ array.h las.h \ svalue.h \ dynamic_buffer.h \ object.h \ stralloc.h \ lex.h \ lpc_types.h \ add_efun.h \ hashtable.h \ macros.h \ error.h \ docode.h add_efun.o: add_efun.c \ add_efun.h \ svalue.h \ types.h machine.h \ hashtable.h \ las.h \ config.h \ dynamic_buffer.h \ program.h \ macros.h \ memory.h \ lpc_types.h \ stralloc.h \ interpret.h
c335351995-10-11David Hedbor alloca.o: alloca.c
624d091996-02-24Fredrik Hübinette (Hubbe) array.o: array.c \ global.h machine.h \ config.h \ port.h \ svalue.h \
5c8e891995-10-29Fredrik Hübinette (Hubbe)  array.h las.h \
624d091996-02-24Fredrik Hübinette (Hubbe)  dynamic_buffer.h \ program.h \ object.h \ stralloc.h \ interpret.h language.h \ error.h \ lpc_types.h \ fsort.h \ builtin_efuns.h \ gc.h
2c4cec1996-04-13Fredrik Hübinette (Hubbe) backend.o: backend.c \ global.h machine.h \ config.h \ port.h \ backend.h \ interpret.h \ program.h \ object.h \ svalue.h \ error.h \ call_out.h \ fd_control.h \ main.h \ callback.h \ array.h las.h \ dynamic_buffer.h
5c8e891995-10-29Fredrik Hübinette (Hubbe) builtin_efuns.o: builtin_efuns.c \
624d091996-02-24Fredrik Hübinette (Hubbe)  global.h machine.h \ config.h \ port.h \ interpret.h \ program.h \ svalue.h \ macros.h \ object.h \ array.h las.h \ dynamic_buffer.h \ error.h \ add_efun.h \ hashtable.h \ mapping.h \ stralloc.h \ lex.h list.h \ lpc_types.h \ rusage.h \ operators.h \ fsort.h \ call_out.h \ callback.h \ gc.h call_out.o: call_out.c \ global.h machine.h \ config.h \ port.h \ array.h las.h \ svalue.h \ dynamic_buffer.h \ program.h \ call_out.h \ object.h \ interpret.h \ error.h \ builtin_efuns.h \ main.h callback.o: callback.c \ macros.h \ memory.h \ types.h machine.h \ callback.h \ array.h las.h \ config.h \ svalue.h \ dynamic_buffer.h \
5c8e891995-10-29Fredrik Hübinette (Hubbe)  program.h dynamic_buffer.o: dynamic_buffer.c \
624d091996-02-24Fredrik Hübinette (Hubbe)  global.h machine.h \ config.h \ port.h \ dynamic_buffer.h \ stralloc.h \ error.h \ svalue.h error.o: error.c \ global.h machine.h \ config.h \ port.h \ macros.h \ error.h \ svalue.h \ interpret.h \ program.h \ stralloc.h \ builtin_efuns.h \
5c8e891995-10-29Fredrik Hübinette (Hubbe)  array.h las.h \
624d091996-02-24Fredrik Hübinette (Hubbe)  dynamic_buffer.h \ object.h
5c8e891995-10-29Fredrik Hübinette (Hubbe) fd_control.o: fd_control.c \
624d091996-02-24Fredrik Hübinette (Hubbe)  fd_control.h \ global.h machine.h \ config.h \
5c8e891995-10-29Fredrik Hübinette (Hubbe)  port.h
624d091996-02-24Fredrik Hübinette (Hubbe) fsort.o: fsort.c \ global.h machine.h \ config.h \ port.h \ fsort.h gc.o: gc.c \ global.h machine.h \ config.h \
2c4cec1996-04-13Fredrik Hübinette (Hubbe)  port.h \ array.h las.h \ svalue.h \ dynamic_buffer.h \ program.h \ list.h \ mapping.h \ object.h gc.h \
624d091996-02-24Fredrik Hübinette (Hubbe)  main.h hashtable.o: hashtable.c \ global.h machine.h \ config.h \ port.h \ hashtable.h \ stralloc.h \ stuff.h \ error.h \ svalue.h interpret.o: interpret.c \ global.h machine.h \ config.h \ port.h \ interpret.h \ program.h \ object.h \ svalue.h \ array.h las.h \ dynamic_buffer.h \ mapping.h \ error.h language.h \ stralloc.h \ add_efun.h \ hashtable.h \ macros.h \ list.h \ backend.h \ operators.h \ opcodes.h \
5c8e891995-10-29Fredrik Hübinette (Hubbe)  main.h lex.h \
624d091996-02-24Fredrik Hübinette (Hubbe)  builtin_efuns.h \ lpc_signal.h las.o: las.c \ global.h machine.h \ config.h \ port.h language.h \ interpret.h \ program.h \ las.h \ svalue.h \ dynamic_buffer.h \ array.h \ object.h \ stralloc.h \ lex.h \ lpc_types.h \ add_efun.h \ hashtable.h \ mapping.h \ list.h \ error.h \ docode.h \ main.h lex.o: lex.c \ global.h machine.h \ config.h \ port.h language.h \ array.h las.h \ svalue.h \ dynamic_buffer.h \ program.h \ lex.h \ stralloc.h \ add_efun.h \ hashtable.h \ stuff.h \ interpret.h \ error.h \ object.h \ operators.h \ opcodes.h \ builtin_efuns.h \ macros.h list.o: list.c \ global.h machine.h \ config.h \ port.h \ array.h las.h \ svalue.h \ dynamic_buffer.h \ program.h \ list.h \ macros.h \ error.h \ interpret.h \
2c4cec1996-04-13Fredrik Hübinette (Hubbe)  builtin_efuns.h \ gc.h
5c8e891995-10-29Fredrik Hübinette (Hubbe) lpc_signal.o: lpc_signal.c \
624d091996-02-24Fredrik Hübinette (Hubbe)  global.h machine.h \ config.h \ port.h \ svalue.h \ interpret.h \ program.h \ stralloc.h \ add_efun.h \ hashtable.h \ las.h \ dynamic_buffer.h \ macros.h \ backend.h lpc_types.o: lpc_types.c \ global.h machine.h \ config.h \ port.h \ svalue.h \ lpc_types.h \ stralloc.h \ stuff.h \ array.h las.h \ dynamic_buffer.h \ program.h \ add_efun.h \ hashtable.h \ object.h \ list.h \ mapping.h \ macros.h \ error.h main.o: main.c \ global.h machine.h \ config.h \ port.h \ backend.h \ module.h \ object.h \ svalue.h \ lex.h \ lpc_types.h \ builtin_efuns.h \
5c8e891995-10-29Fredrik Hübinette (Hubbe)  array.h las.h \
624d091996-02-24Fredrik Hübinette (Hubbe)  dynamic_buffer.h \ program.h \ stralloc.h \ interpret.h \ error.h \ macros.h \ callback.h \ lpc_signal.h mapping.o: mapping.c \ global.h machine.h \ config.h \ port.h \ mapping.h \ las.h \ svalue.h \ dynamic_buffer.h \ program.h \ array.h \ macros.h language.h \ error.h \
2c4cec1996-04-13Fredrik Hübinette (Hubbe)  interpret.h \ gc.h
624d091996-02-24Fredrik Hübinette (Hubbe) memory.o: memory.c \ global.h machine.h \ config.h \ port.h \ error.h \
5c8e891995-10-29Fredrik Hübinette (Hubbe)  svalue.h
624d091996-02-24Fredrik Hübinette (Hubbe) module.o: module.c \ module.h \ types.h machine.h \ macros.h \ memory.h \ error.h \
5c8e891995-10-29Fredrik Hübinette (Hubbe)  svalue.h modlist.h
624d091996-02-24Fredrik Hübinette (Hubbe) object.o: object.c \ global.h machine.h \ config.h \ port.h \ object.h \ svalue.h \ dynamic_buffer.h \ interpret.h \ program.h \ stralloc.h \ macros.h \ error.h \ main.h \ array.h las.h \ gc.h opcodes.o: opcodes.c \ global.h machine.h \ config.h \ port.h \ interpret.h \ program.h \ svalue.h \
5c8e891995-10-29Fredrik Hübinette (Hubbe)  array.h las.h \
624d091996-02-24Fredrik Hübinette (Hubbe)  dynamic_buffer.h \ stralloc.h \ mapping.h \ list.h \ opcodes.h \ object.h \ error.h \ lpc_types.h operators.o: operators.c \ global.h machine.h \ config.h \ port.h \ interpret.h \ program.h \ svalue.h \
5c8e891995-10-29Fredrik Hübinette (Hubbe)  list.h las.h \
624d091996-02-24Fredrik Hübinette (Hubbe)  dynamic_buffer.h \ mapping.h \ array.h \ stralloc.h \ opcodes.h \ operators.h language.h \ error.h \ docode.h \ add_efun.h \ hashtable.h
2c4cec1996-04-13Fredrik Hübinette (Hubbe) peep.o: peep.c \ global.h machine.h \ config.h \ port.h \ peep_engine.c peep_engine.o: peep_engine.c
624d091996-02-24Fredrik Hübinette (Hubbe) port.o: port.c \ global.h machine.h \ config.h \ port.h \ macros.h program.o: program.c \ global.h machine.h \ config.h \ port.h \ program.h \ object.h \ svalue.h \ dynamic_buffer.h \ lpc_types.h \ stralloc.h \ las.h language.h \ lex.h \ macros.h \ fsort.h \ error.h \ docode.h \ interpret.h \ hashtable.h \ main.h gc.h \ compilation.h rusage.o: rusage.c \ global.h machine.h \ config.h \ port.h \ rusage.h stralloc.o: stralloc.c \ global.h machine.h \ config.h \ port.h \ stralloc.h \ macros.h \ dynamic_buffer.h \ error.h \ svalue.h stuff.o: stuff.c \ stuff.h \
5c8e891995-10-29Fredrik Hübinette (Hubbe)  types.h machine.h
624d091996-02-24Fredrik Hübinette (Hubbe) svalue.o: svalue.c \ global.h machine.h \ config.h \ port.h \ svalue.h \ stralloc.h \ array.h las.h \ dynamic_buffer.h \ program.h \ mapping.h \ list.h \ object.h \ add_efun.h \ hashtable.h \
5c8e891995-10-29Fredrik Hübinette (Hubbe)  error.h
f0c7931995-09-12David Hedbor ualarm.o: ualarm.c