# Copyright (c) 1993 Xerox Corporation. All rights reserved. # #-$Id$ # #-$Date$ # # # VERY IMPORTANT: # NO target-config-dependent things go in in Makefile directly. # ALL target-config-dependent things go in config.mk, below. # # # # include config.mk here to define: # # CC -- C compiler # CONFIG_CPPFLAGS # CONFIG_CFLAGS # # ASPP -- assembler preprocessor (CPP) # CONFIG_ASPPFLAGS # # AS -- assembler # CONFIG_ASFLAGS # # LDR -- loader for reloadable modules # CONFIG_LDRFLAGS # # LD -- loader # CONFIG_LDFLAGS # # INCLUDE -- search path for header files # include ../config/config.mk # # locations of object files # INSTALL_LIB = ../lib INSTALL_BIN = ../bin # # compilation flags, etc. # CPPFLAGS = $(INCLUDE) $(CONFIG_CPPFLAGS) \ -DPCR_NO_RENAME -DPCR_NO_HOSTDEP_ERR CFLAGS =-c $(CONFIG_CFLAGS) ASPPFLAGS = $(INCLUDE) $(CONFIG_ASPPFLAGS) \ -DPCR_NO_RENAME -DPCR_NO_HOSTDEP_ERR -DASM ASFLAGS = $(CONFIG_ASFLAGS) LDRFLAGS = $(CONFIG_LDRFLAGS) LDFLAGS = $(CONFIG_LDFLAGS) # # standard commands and default rules # INSTALL = cp -p .s.o: $(ASPP) $(ASPPFLAGS) $< > tmp.s ; $(AS) $(ASFLAGS) tmp.s -o $@ ; \ rm -f tmp.s .c.o: $(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ # # # # # BEGIN PACKAGE-SPECIFIC PART # # # # # # Default target # default: base.o # # SOURCE FILE DEFINITION # # define CSRC SSRC MISCSRC HDEFS MISCDEFS. # # define MAKEDEP_MISCSRC = commands to make MISCSRC dependencies # (dependencies for .c and .s files are done automatically). # CSRC = PCR_BaseImpl.c PCR_BaseArgsImpl.c PCR_BaseArgsDefaults.c \ PCR_BaseMain.c SSRC = MISCSRC = SRC = $(CSRC) $(SSRC) $(MISCSRC) MAKEDEP_MISCSRC = HDEFS = PCR_Base.h PCR_BaseArgs.h PCR_BaseRun.h MISCDEFS = DEFS = $(HDEFS) $(MISCDEFS) # # # INSTALL DEFINITION # # define INSTALL_LIBFILES = targets to be copied into INSTALL_LIB # define INSTALL_BINFILES = targets to be copied into INSTALL_BIN # INSTALL_BINFILES = pcr INSTALL_LIBFILES = base.o # # package-specific definitions and rules # BASEOBJ = PCR_BaseImpl.o PCR_BaseArgsImpl.o PCR_BaseArgsDefaults.o COBJ = $(BASEOBJ) PCR_BaseMain.o SOBJ = MISCOBJ = XPCROBJ = ../cmd/cmd.o ../config/config.o \ ../dbg/dbg.o ../emu/emu.o ../gc/gc.o ../il/il.o ../io/io.o \ ../mm/mm.o ../rpc/rpc.o ../shm/shm.o ../sig/sig.o ../th/th.o ../vd/vd.o \ ../exec/exec.o pcr: pcr.o PCR_BaseMain.o $(LD) $(LDFLAGS) -o pcr pcr.o PCR_BaseMain.o \ $(SOCKLIB) $(MATHLIB) $(DLLIB) pcr.o: base.o $(XPCROBJ) $(LDR) $(LDRFLAGS) -o pcr.o base.o $(XPCROBJ) base.o: $(BASEOBJ) $(SOBJ) $(LDR) $(LDRFLAGS) -o base.o $(BASEOBJ) $(SOBJ) # # # # # END PACKAGE-SPECIFIC PART # # # # # # # STANDARD TARGETS # # # # make install # install: $(INSTALL_LIBFILES) $(INSTALL_BINFILES) -if [ -n "$(INSTALL_LIBFILES)" ] ; then \ ( cd $(INSTALL_LIB) ; rm -f $(INSTALL_LIBFILES) ) ; \ $(INSTALL) $(INSTALL_LIBFILES) $(INSTALL_LIB) ; \ fi -if [ -n "$(INSTALL_BINFILES)" ] ; then \ ( cd $(INSTALL_BIN) ; rm -f $(INSTALL_BINFILES) ) ; \ $(INSTALL) $(INSTALL_BINFILES) $(INSTALL_BIN) ; \ fi # # make clean # clean: rm -f *.o *~ core a.out *.a *.BAK *.bak *.CKP logmsg.txt pcr # # make depend # # NOTE: the makefile must include "# DO NOT DELETE THIS LINE" # and at least one additional line of text after the last target. # "make depend" will replace everything following that line # by a newly-constructed list of dependencies. # # You can modify the behavior of this target by defining $(MAKEDEP_MISCSRC). # makedep: $(CSRC) $(SSRC) $(MISCSRC) rm -f makedep $(MAKEDEP_MISCSRC) -for x in $(CSRC) END ; \ do if [ $$x != END ]; then \ $(CPP) -M $(CPPFLAGS) $$x \ | sed -e '/:$$/d' >> makedep ; \ fi ; \ done -for x in $(SSRC) END ; \ do if [ $$x != END ]; then \ $(ASPP) -M $(ASPPFLAGS) $$x \ | sed -e '/:$$/d' \ | sed -e 's/[.]s[.]o :/.o :/g' >> makedep ; \ fi ; \ done depend: makedep echo '/^# DO NOT DELETE THIS LINE/,$$c' > eddep echo '# DO NOT DELETE THIS LINE' >> eddep echo '# Make depend depends on it' >> eddep echo '.' >> eddep echo '$$r makedep' >> eddep echo 'w' >> eddep rm -f Makefile.bak mv Makefile Makefile.bak cp Makefile.bak Makefile chmod u+w Makefile ex - Makefile < eddep -if [ ! -w Makefile.bak ] ; then chmod u-w Makefile ; fi rm -f eddep makedep # # # END OF HUMAN-EDITABLE PART # # # #-$Log$ # # # DO NOT DELETE THIS LINE # Make depend depends on it PCR_BaseImpl.o : PCR_BaseImpl.c ../config/PCR_StdDefs.h \ ../config/PCR_StdTypes.h ../config/PCR_Arch.h ../config/PCR_OS.h \ ../th/PCR_Th.h ../sig/PCR_Sig.h ../sig/PCR_SigTypes.h ../th/PCR_ThTypes.h \ ../th/PCR_ThCrSec.h ../th/PCR_ThCrSecInlines.h ../th/PCR_ThCurr.h \ ../th/PCR_ThPvt.h ../th/PCR_ThData.h ../th/PCR_ThCtl.h \ ../th/PCR_ThCtlTypes.h ../posix/limits.h ../posix/host/limits.h \ ../posix/setjmp.h ../mm/PCR_MM.h ../posix/stddef.h ../posix/host/stddef.h \ ../sig/PCR_SigGlue.h ../sig/PCR_SigPvt.h ../host/signal.h \ /usr/include/sys/signal.h /usr/include/vm/faultcode.h \ /usr/include/sys/stdtypes.h ../il/PCR_IL.h ../il/PCR_DataSource.h \ ../io/PCR_IOGblGlue.h ../io/PCR_IOGbl.h ../posix/sys/stat.h \ ../host/sys/stat.h ../posix/sys/types.h ../posix/host/sys/types.h \ /usr/include/sys/sysmacros.h ../io/PCR_IO.h ../posix/dirent.h \ ../posix/host/dirent.h /usr/include/sys/dirent.h ../posix/fcntl.h \ ../host/fcntl.h /usr/include/sys/fcntlcom.h ../posix/utime.h \ ../host/utime.h ../base/PCR_Base.h ../base/PCR_BaseArgs.h \ /import/gnu/lib/gcc-include/stdarg.h ../base/PCR_BaseRun.h ../posix/errno.h \ ../host/errno.h /usr/include/sys/errno.h ../ansi/string.h ../ansi/stdlib.h \ ../posix/host/stdlib.h ../posix/unistd.h ../posix/host/unistd.h \ ../posix/signal.h PCR_BaseArgsImpl.o : PCR_BaseArgsImpl.c ../config/PCR_StdDefs.h \ ../config/PCR_StdTypes.h ../config/PCR_Arch.h ../base/PCR_Base.h \ ../base/PCR_BaseArgs.h /import/gnu/lib/gcc-include/stdarg.h \ ../posix/errno.h ../host/errno.h /usr/include/sys/errno.h \ ../posix/sys/types.h ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h ../ansi/string.h ../ansi/stdlib.h \ ../posix/host/stdlib.h PCR_BaseArgsDefaults.o : PCR_BaseArgsDefaults.c ../base/PCR_Base.h \ ../config/PCR_StdTypes.h ../base/PCR_BaseArgs.h \ /import/gnu/lib/gcc-include/stdarg.h PCR_BaseMain.o : PCR_BaseMain.c ../config/PCR_StdDefs.h \ ../config/PCR_StdTypes.h ../config/PCR_Arch.h ../base/PCR_Base.h \ ../base/PCR_BaseArgs.h /import/gnu/lib/gcc-include/stdarg.h ../ansi/math.h \ ../posix/host/math.h /usr/include/floatingpoint.h /usr/include/sys/ieeefp.h