933d361996-04-29Fredrik 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.
f3bce61996-06-21Fredrik Hübinette (Hubbe) LIBS=@LIBS@ $(EXTRALIBS)
933d361996-04-29Fredrik Hübinette (Hubbe)  # not used yet INSTALL=@INSTALL@ SRCDIR=@srcdir@ VPATH=@srcdir@ # These are used while compiling TMP_LIBDIR = @LIBDIR@ TMP_BINDIR = @BINDIR@ TMP_BUILDDIR = @BUILDDIR@ TMP_DOCDIR = @DOCDIR@ prefix = @prefix@ exec_prefix = $(prefix)/bin
06983f1996-09-22Fredrik Hübinette (Hubbe) lib_prefix = $(prefix)/lib/pike
933d361996-04-29Fredrik Hübinette (Hubbe)  # # 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@ #add extra defines here
51bd9e1996-10-09Fredrik Hübinette (Hubbe) # Be sure to use -g when looking for bugs
af56471996-12-03Fredrik Hübinette (Hubbe) DEFINES=@CPPFLAGS@
933d361996-04-29Fredrik Hübinette (Hubbe)  # -O should work with all compilers OPTIMIZE=@OPTIMIZE@ # Preprocessor flags. PREFLAGS=-I. -I$(SRCDIR) $(DEFINES)
51bd9e1996-10-09Fredrik Hübinette (Hubbe) OTHERFLAGS=@CFLAGS@ $(OSFLAGS) $(OPTIMIZE) $(WARN) $(PROFIL)
933d361996-04-29Fredrik Hübinette (Hubbe) CFLAGS=$(PREFLAGS) $(OTHERFLAGS) CC=@CC@ CPP=@CPP@ LD=$(CC)
51bd9e1996-10-09Fredrik Hübinette (Hubbe) LDFLAGS=$(CFLAGS) @LDFLAGS@
933d361996-04-29Fredrik Hübinette (Hubbe) 
06983f1996-09-22Fredrik Hübinette (Hubbe) RUNPIKE=$(TMP_BUILDDIR)/pike -m $(TMP_LIBDIR)/master.pike $(PIKEOPTS)
933d361996-04-29Fredrik Hübinette (Hubbe) 
51bd9e1996-10-09Fredrik Hübinette (Hubbe) MAKE_FLAGS = "prefix=$(prefix)" "exec_prefix=$(exec_prefix)" "CC=$(CC)" "OTHERFLAGS=$(OTHERFLAGS)" "TMP_BINDIR=$(TMP_BINDIR)" "DEFINES=$(DEFINES)" "TMP_LIBDIR=$(TMP_LIBDIR)" "RUNPIKE=$(RUNPIKE)"
933d361996-04-29Fredrik 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. #
f3bce61996-06-21Fredrik Hübinette (Hubbe) OBJ= \
90c62d1997-01-26Fredrik Hübinette (Hubbe)  language.o \
06983f1996-09-22Fredrik Hübinette (Hubbe)  constants.o \
f3bce61996-06-21Fredrik Hübinette (Hubbe)  array.o \ backend.o \
06983f1996-09-22Fredrik Hübinette (Hubbe)  builtin_functions.o \
f3bce61996-06-21Fredrik Hübinette (Hubbe)  callback.o \
90c62d1997-01-26Fredrik Hübinette (Hubbe)  encode.o \
f3bce61996-06-21Fredrik Hübinette (Hubbe)  docode.o \ dynamic_buffer.o \
ca74dd1996-10-08Fredrik Hübinette (Hubbe)  dynamic_load.o \
f3bce61996-06-21Fredrik Hübinette (Hubbe)  error.o \ fd_control.o \ fsort.o \ gc.o \ hashtable.o \ interpret.o \ las.o \ lex.o \
06983f1996-09-22Fredrik Hübinette (Hubbe)  multiset.o \ signal_handler.o \ pike_types.o \
f3bce61996-06-21Fredrik Hübinette (Hubbe)  main.o \ mapping.o \ memory.o \ module.o \
dfa0b61997-01-21Fredrik Hübinette (Hubbe)  module_support.o \
f3bce61996-06-21Fredrik Hübinette (Hubbe)  object.o \ opcodes.o \ operators.o \ peep.o \ port.o \ program.o \ rusage.o \ stralloc.o \ stuff.o \
07513e1996-10-04Fredrik Hübinette (Hubbe)  threads.o \
6265aa1997-01-18Fredrik Hübinette (Hubbe)  version.o \
f3248c1996-08-03Fredrik Hübinette (Hubbe)  svalue.o @EXTRA_OBJS@
933d361996-04-29Fredrik Hübinette (Hubbe) # # User callable targets #
549f8b1996-05-02Fredrik Hübinette (Hubbe) all: $(OBJ) module_objects
06983f1996-09-22Fredrik Hübinette (Hubbe)  $(MAKE) $(MAKE_FLAGS) pike
933d361996-04-29Fredrik Hübinette (Hubbe) 
57535e1997-01-11Henrik Grubbström (Grubba) pike: $(OBJ) modules/linker_options modules/lib_dirs
06983f1996-09-22Fredrik Hübinette (Hubbe)  -mv pike pike.old
57535e1997-01-11Henrik Grubbström (Grubba)  $(LD) $(LDFLAGS) $(OBJ) `cat modules/linker_options` @SET_RUN_PATH@ $(LIBS) -o pike
933d361996-04-29Fredrik Hübinette (Hubbe)  # purify pure: $(OBJ) module_objects
06983f1996-09-22Fredrik Hübinette (Hubbe)  -mv pike pike.old
57535e1997-01-11Henrik Grubbström (Grubba)  purify -free-queue-length=500 -inuse-at-exit=yes -chain-length=12 $(LD) $(LDFLAGS) $(OBJ) `cat modules/linker_options` @SET_RUN_PATH@ $(LIBS) -o pike
933d361996-04-29Fredrik Hübinette (Hubbe)  # purecov cover: $(OBJ) module_objects
06983f1996-09-22Fredrik Hübinette (Hubbe)  -mv pike pike.old
57535e1997-01-11Henrik Grubbström (Grubba)  purecov purify -free-queue-length=500 -inuse-at-exit=yes -chain-length=12 $(LD) $(LDFLAGS) $(OBJ) `cat modules/linker_options` @SET_RUN_PATH@ $(LIBS) -o pike
933d361996-04-29Fredrik Hübinette (Hubbe)  # quantify quant: $(OBJ) module_objects
06983f1996-09-22Fredrik Hübinette (Hubbe)  -mv pike pike.old
57535e1997-01-11Henrik Grubbström (Grubba)  quantify $(LD) $(LDFLAGS) $(OBJ) `cat modules/linker_options` @SET_RUN_PATH@ $(LIBS) -o pike
933d361996-04-29Fredrik Hübinette (Hubbe)  # install install:
6560621996-09-26Fredrik Hübinette (Hubbe)  if [ ! -d "$(prefix)" ]; then mkdir "$(prefix)" ; chmod 755 "$(prefix)" ; else : ; fi if [ ! -d "$(exec_prefix)" ]; then mkdir "$(exec_prefix)" ; chmod 755 "$(exec_prefix)" ; else : ; fi
06983f1996-09-22Fredrik Hübinette (Hubbe)  $(INSTALL) ./pike $(exec_prefix)
598acb1997-01-21Henrik Grubbström (Grubba)  $(INSTALL) $(SRCDIR)/../bin/hilfe $(exec_prefix)
6560621996-09-26Fredrik Hübinette (Hubbe)  if [ ! -d "$(prefix)/lib" ]; then mkdir "$(prefix)/lib" ; chmod 755 "$(prefix)/lib" ; else : ; fi if [ ! -d "$(lib_prefix)" ]; then mkdir "$(lib_prefix)" ; chmod 755 "$(lib_prefix)" ; else : ; fi
42d6b81997-01-15Fredrik Hübinette (Hubbe)  if [ ! -d "$(prefix)/include" ]; then mkdir "$(prefix)/include"; chmod 755 "$(prefix)/include"; fi if [ ! -d "$(prefix)/include/pike" ]; then mkdir "$(prefix)/include/pike"; chmod 755 "$(prefix)/include/pike"; fi $(INSTALL) $(SRCDIR)/*.h *.h $(prefix)/include/pike
06983f1996-09-22Fredrik Hübinette (Hubbe)  $(INSTALL) $(TMP_LIBDIR)/master.pike $(lib_prefix) cp -r $(TMP_LIBDIR)/include $(lib_prefix)
933d361996-04-29Fredrik Hübinette (Hubbe)  # tidy up a bit tidy:
b04d5f1996-07-08Fredrik Hübinette (Hubbe)  -rm -f *.o core y.output y.tab.c y.tab.h
06983f1996-09-22Fredrik Hübinette (Hubbe)  -rm -f $(TMP_BINDIR)/core *.o *.i *.i~ testsuite
933d361996-04-29Fredrik Hübinette (Hubbe)  # make clean clean: tidy
f3248c1996-08-03Fredrik Hübinette (Hubbe)  -( cd modules; ${MAKE} $(MAKE_FLAGS) clean )
933d361996-04-29Fredrik Hübinette (Hubbe)  -rm -f TAGS tags -rm -f yacc.acts yacc.debug yacc.tmp *.debug.log a.out # make _really_ clean 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*
e5bb7d1996-09-23Fredrik Hübinette (Hubbe)  -rm -f modules/*/testsuite
933d361996-04-29Fredrik Hübinette (Hubbe)  # create tags tags: ctags *.c TAGS: etags -t *.h *.c # verify / debug
115ae01996-09-25Fredrik Hübinette (Hubbe) verify_modules:
e5bb7d1996-09-23Fredrik Hübinette (Hubbe)  ( cd modules ; $(MAKE) $(MAKE_FLAGS) verify )
933d361996-04-29Fredrik Hübinette (Hubbe) 
115ae01996-09-25Fredrik Hübinette (Hubbe) verbose_verify_modules: ( cd modules ; $(MAKE) $(MAKE_FLAGS) verbose_verify ) verify: testsuite verify_modules $(RUNPIKE) $(TMP_BINDIR)/test_pike.pike testsuite
af56471996-12-03Fredrik Hübinette (Hubbe) check: verify
933d361996-04-29Fredrik Hübinette (Hubbe) # verify / debug verbose
115ae01996-09-25Fredrik Hübinette (Hubbe) verbose_verify: testsuite verbose_verify_modules
e5bb7d1996-09-23Fredrik Hübinette (Hubbe)  $(RUNPIKE) $(TMP_BINDIR)/test_pike.pike testsuite --verbose
933d361996-04-29Fredrik Hübinette (Hubbe)  # verify & debug VERBOSE
06983f1996-09-22Fredrik Hübinette (Hubbe) gdb_verify: testsuite
41a0f41996-06-09Fredrik Hübinette (Hubbe)  @echo >.gdbinit handle SIGUSR1 nostop noprint pass
e5bb7d1996-09-23Fredrik Hübinette (Hubbe)  @echo >>.gdbinit run -m $(TMP_LIBDIR)/master.pike $(PIKEOPTS) $(TMP_BINDIR)/test_pike.pike testsuite -v -v -f
06983f1996-09-22Fredrik Hübinette (Hubbe)  gdb ./pike
41a0f41996-06-09Fredrik Hübinette (Hubbe)  @rm .gdbinit
933d361996-04-29Fredrik Hübinette (Hubbe)  # run hilfe, for interactive testing run_hilfe:
06983f1996-09-22Fredrik Hübinette (Hubbe)  $(RUNPIKE) $(TMP_BINDIR)/hilfe
933d361996-04-29Fredrik Hübinette (Hubbe) 
06983f1996-09-22Fredrik Hübinette (Hubbe) # make export archive (requires compiled Pike)
933d361996-04-29Fredrik Hübinette (Hubbe) # Do not compile in source tree if you want to use this! # Beware that export archive this includes bison/yacc/byacc source # and thus has to follow the rules stated in that code.
06983f1996-09-22Fredrik Hübinette (Hubbe) export: new_peep_engine $(SRCDIR)/language.c $(SRCDIR)/language.h depend
933d361996-04-29Fredrik Hübinette (Hubbe)  chmod +x $(SRCDIR)/install-sh
192f721996-12-01Fredrik Hübinette (Hubbe)  $(RUNPIKE) $(TMP_BINDIR)/export.pike image pipe spider ssleay
f838321996-10-09Fredrik Hübinette (Hubbe)  full_export: new_peep_engine $(SRCDIR)/language.c $(SRCDIR)/language.h depend chmod +x $(SRCDIR)/install-sh
06983f1996-09-22Fredrik Hübinette (Hubbe)  $(RUNPIKE) $(TMP_BINDIR)/export.pike
933d361996-04-29Fredrik Hübinette (Hubbe)  new_peep_engine:
06983f1996-09-22Fredrik Hübinette (Hubbe)  $(RUNPIKE) $(TMP_BINDIR)/mkpeep.pike $(SRCDIR)/peep.in >$(SRCDIR)/peep_engine.c
933d361996-04-29Fredrik Hübinette (Hubbe) 
115ae01996-09-25Fredrik Hübinette (Hubbe) $(SRCDIR)/peep_engine.c: peep.in
933d361996-04-29Fredrik Hübinette (Hubbe)  echo "" >$(SRCDIR)/peep_engine.c
06983f1996-09-22Fredrik Hübinette (Hubbe)  -$(RUNPIKE) $(TMP_BINDIR)/mkpeep.pike $(SRCDIR)/peep.in >$(SRCDIR)/peep_engine.c
933d361996-04-29Fredrik Hübinette (Hubbe) 
115ae01996-09-25Fredrik Hübinette (Hubbe) peep.o: $(SRCDIR)/peep_engine.c
d8632c1996-05-04Fredrik Hübinette (Hubbe) 
06983f1996-09-22Fredrik Hübinette (Hubbe) # make dependencies (requires compiled Pike)
933d361996-04-29Fredrik Hübinette (Hubbe) depend: language.c
e5bb7d1996-09-23Fredrik Hübinette (Hubbe)  gcc -MM $(PREFLAGS) $(SRCDIR)/*.c | $(TMP_BINDIR)/fixdepends.sh $(SRCDIR)
f3bce61996-06-21Fredrik Hübinette (Hubbe)  ( cd modules ; $(MAKE) $(MAKE_FLAGS) depend )
933d361996-04-29Fredrik Hübinette (Hubbe)  docs: mkdir docs html_docs: docs
06983f1996-09-22Fredrik Hübinette (Hubbe)  $(RUNPIKE) $(TMP_BINDIR)/htmlify_docs docs $(TMP_DOCDIR) `echo $(SRCDIR)/modules/*/doc`
933d361996-04-29Fredrik Hübinette (Hubbe) #
06983f1996-09-22Fredrik Hübinette (Hubbe) # Pike internal targets
933d361996-04-29Fredrik Hübinette (Hubbe) # module_objects:
f3bce61996-06-21Fredrik Hübinette (Hubbe)  ( cd modules ; ${MAKE} $(MAKE_FLAGS) )
933d361996-04-29Fredrik Hübinette (Hubbe) 
292a2b1996-11-21Fredrik Hübinette (Hubbe) language.o: $(SRCDIR)/language.c config.h object.h interpret.h program.h
933d361996-04-29Fredrik Hübinette (Hubbe) 
1b34bd1996-09-29Fredrik Hübinette (Hubbe) $(SRCDIR)/language.h: language.yacc
933d361996-04-29Fredrik Hübinette (Hubbe)  @echo "Expect 1 shift/reduce conflict."
74a2051996-10-02Per Hedbor  $(YACC) $(YFLAGS) $(SRCDIR)/language.yacc
933d361996-04-29Fredrik Hübinette (Hubbe)  mv y.tab.c $(SRCDIR)/language.c mv y.tab.h $(SRCDIR)/language.h $(SRCDIR)/language.c: language.h touch $(SRCDIR)/language.c module.c: modlist.h
549f8b1996-05-02Fredrik Hübinette (Hubbe) $(SRCDIR)/configure: configure.in
933d361996-04-29Fredrik Hübinette (Hubbe)  cd $(SRCDIR) && autoconf
549f8b1996-05-02Fredrik Hübinette (Hubbe) config.status: $(SRCDIR)/configure
933d361996-04-29Fredrik Hübinette (Hubbe)  ./config.status --recheck
6265aa1997-01-18Fredrik Hübinette (Hubbe) Makefile: $(SRCDIR)/Makefile.in $(SRCDIR)/dependencies config.status
549f8b1996-05-02Fredrik Hübinette (Hubbe)  CONFIG_FILES=Makefile CONFIG_HEADERS= ./config.status @echo "Run make again" @exit 1
933d361996-04-29Fredrik Hübinette (Hubbe)  machine.h: stamp-h stamp-h: machine.h.in config.status
549f8b1996-05-02Fredrik Hübinette (Hubbe)  CONFIG_FILES= CONFIG_HEADERS=machine.h ./config.status
933d361996-04-29Fredrik Hübinette (Hubbe) 
e5bb7d1996-09-23Fredrik Hübinette (Hubbe) testsuite: $(SRCDIR)/testsuite.in $(TMP_BINDIR)/mktestsuite $(SRCDIR)/testsuite.in >testsuite
933d361996-04-29Fredrik Hübinette (Hubbe) 
6265aa1997-01-18Fredrik Hübinette (Hubbe) @dependencies@