# 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_HOSTDEP_ERR \ -DPCR_NO_RENAME CFLAGS =-c $(CONFIG_CFLAGS) ASPPFLAGS = $(INCLUDE) $(CONFIG_ASPPFLAGS) -DPCR_NO_HOSTDEP_ERR -DASM ASFLAGS = $(CONFIG_ASFLAGS) LDRFLAGS = $(CONFIG_LDRFLAGS) LDGFLAGS = $(CONFIG_LDGFLAGS) 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: mkxr.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 = XR_GCImpl.c XR_ILImpl.c XR_ThreadsImpl.c \ XR_ThreadsDynamicEnvironment.c \ XR_UIOImpl.c XR_UIOCompatImpl.c \ XR_DummiesImpl.c XR_SpawnImpl.c XR_StackPushTestImpl.c \ XR_ThreadsTerminationImpl.c XR_UIOEventsImpl.c XR_DummyCirioImpl.c \ XR_InstallAndRunPackage.c dummy_malloc.c SSRC = MISCSRC = SRC = $(CSRC) $(SSRC) $(MISCSRC) MAKEDEP_MISCSRC = HDEFS = XR_Basics.h XR_GC.h XR_IL.h XR_Threads.h \ XR_ThreadsDynamicEnvironment.h XR_UIO.h \ XR_errno.h XR_fcntl.h XR_poll.h XR_stropts.h \ XR_sys_dirent.h XR_sys_fbio.h XR_sys_file.h XR_sys_filio.h \ XR_sys_ipc.h XR_sys_kbio.h XR_sys_mman.h XR_sys_shm.h \ XR_sys_signal.h XR_sys_socket.h XR_sys_sockio.h XR_sys_stat.h \ XR_sys_time.h XR_sys_types.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 = INSTALL_LIBFILES = # # package-specific definitions and rules # COBJ = XR_GCImpl.o XR_ILImpl.o XR_ThreadsImpl.o \ XR_ThreadsDynamicEnvironment.o \ XR_UIOImpl.o XR_UIOCompatImpl.o \ XR_DummiesImpl.o XR_SpawnImpl.o XR_StackPushTestImpl.o \ XR_ThreadsTerminationImpl.o XR_UIOEventsImpl.o XR_DummyCirioImpl.o SOBJ = MISCOBJ = xr.o: $(COBJ) $(LDR) $(LDRFLAGS) -o xr.o $(COBJ) # FIX THIS LATER so it works in either 4.x or solaris # for now, this produces lots of error messages and a trashy libxr.so # in 4.1. But you won't need the libxr.so on that system so ignore it. libxr.so: xr.o $(LD) $(LDGFLAGS) -o libxr.so xr.o mkxr.o: $(MAKE) xr.o libxr.so XR_InstallAndRunPackage.o dummy_malloc.o # # # # # 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 XR_GCImpl.o : XR_GCImpl.c ../xr/XR_Basics.h ../xr/XR_GC.h ../posix/stddef.h \ ../posix/host/stddef.h ../xr/XR_Threads.h ../th/PCR_Th.h \ ../config/PCR_Arch.h ../config/PCR_StdDefs.h ../config/PCR_StdTypes.h \ ../sig/PCR_Sig.h ../config/PCR_OS.h ../sig/PCR_SigTypes.h \ ../th/PCR_ThTypes.h ../base/PCR_Base.h ../base/PCR_BaseArgs.h \ /import/gnu/lib/gcc-include/stdarg.h ../mm/PCR_MM.h \ /import/gc/src/gc_private.h /import/gc/src/gc.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h /import/gc/src/gc_headers.h ../posix/time.h \ ../host/time.h XR_ILImpl.o : XR_ILImpl.c ../config/PCR_OS.h ../xr/XR_Basics.h \ ../xr/XR_Threads.h ../th/PCR_Th.h ../config/PCR_Arch.h \ ../config/PCR_StdDefs.h ../config/PCR_StdTypes.h ../sig/PCR_Sig.h \ ../sig/PCR_SigTypes.h ../th/PCR_ThTypes.h ../xr/XR_IL.h \ ../xr/XR_sys_types.h ../xr/XR_errno.h ../posix/errno.h ../host/errno.h \ /usr/include/sys/errno.h ../base/PCR_Base.h ../base/PCR_BaseArgs.h \ /import/gnu/lib/gcc-include/stdarg.h ../mm/PCR_MM.h ../posix/stddef.h \ ../posix/host/stddef.h ../il/PCR_IL.h ../il/PCR_DataSource.h \ ../il/PCR_ILPvt.h ../il/PCR_ILSym.h ../il/PCR_ILRdr.h ../il/PCR_ILZone.h \ ../io/PCR_IO.h ../posix/sys/types.h ../posix/host/sys/types.h \ /usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h ../posix/dirent.h \ ../posix/host/dirent.h /usr/include/sys/dirent.h ../posix/sys/stat.h \ ../host/sys/stat.h ../posix/fcntl.h ../host/fcntl.h \ /usr/include/sys/fcntlcom.h ../posix/utime.h ../host/utime.h \ ../cmd/PCR_Cmd.h XR_ThreadsImpl.o : XR_ThreadsImpl.c ../xr/XR_Basics.h ../xr/XR_Threads.h \ ../th/PCR_Th.h ../config/PCR_Arch.h ../config/PCR_StdDefs.h \ ../config/PCR_StdTypes.h ../sig/PCR_Sig.h ../config/PCR_OS.h \ ../sig/PCR_SigTypes.h ../th/PCR_ThTypes.h ../th/PCR_ThData.h \ ../base/PCR_Base.h ../base/PCR_BaseArgs.h \ /import/gnu/lib/gcc-include/stdarg.h ../mm/PCR_MM.h ../posix/stddef.h \ ../posix/host/stddef.h ../posix/signal.h ../posix/sys/types.h \ ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h ../posix/setjmp.h ../posix/errno.h \ ../host/errno.h /usr/include/sys/errno.h XR_ThreadsDynamicEnvironment.o : XR_ThreadsDynamicEnvironment.c \ ../th/PCR_ThData.h ../config/PCR_Arch.h ../config/PCR_StdTypes.h \ ../sig/PCR_SigTypes.h ../config/PCR_OS.h ../th/PCR_ThDynEnv.h \ ../base/PCR_Base.h ../base/PCR_BaseArgs.h \ /import/gnu/lib/gcc-include/stdarg.h ../xr/XR_Basics.h \ ../xr/XR_ThreadsDynamicEnvironment.h XR_SpawnImpl.o : XR_SpawnImpl.c ../xr/XR_UIO.h ../xr/XR_Threads.h \ ../xr/XR_Basics.h ../th/PCR_Th.h ../config/PCR_Arch.h \ ../config/PCR_StdDefs.h ../config/PCR_StdTypes.h ../sig/PCR_Sig.h \ ../config/PCR_OS.h ../sig/PCR_SigTypes.h ../th/PCR_ThTypes.h \ ../xr/XR_sys_types.h ../xr/XR_errno.h ../posix/errno.h ../host/errno.h \ /usr/include/sys/errno.h ../xr/XR_fcntl.h ../posix/fcntl.h ../host/fcntl.h \ /usr/include/sys/fcntlcom.h /usr/include/sys/stdtypes.h ../posix/sys/stat.h \ ../host/sys/stat.h ../posix/sys/types.h ../posix/host/sys/types.h \ /usr/include/sys/sysmacros.h ../xr/XR_poll.h ../xr/XR_stropts.h \ /import/gnu/lib/gcc-include/stropts.h \ /import/gnu/lib/gcc-include/sys/ioccom.h ../xr/XR_sys_dirent.h \ /usr/include/sys/dirent.h ../xr/XR_sys_fbio.h \ /import/gnu/lib/gcc-include/sun/fbio.h ../xr/XR_sys_file.h \ ../xr/XR_sys_filio.h /import/gnu/lib/gcc-include/sys/filio.h \ ../xr/XR_sys_ipc.h /usr/include/sys/ipc.h ../xr/XR_sys_kbio.h \ /import/gnu/lib/gcc-include/sundev/kbio.h ../xr/XR_sys_mman.h \ ../shm/PCR_ShmBSD.h ../host/sys/mman.h ../xr/XR_sys_shm.h \ /usr/include/sys/shm.h /usr/include/sys/param.h \ /usr/include/machine/param.h /usr/include/sys/signal.h \ /usr/include/vm/faultcode.h /usr/include/machine/mmu.h \ /usr/include/debug/debug.h /usr/include/mon/sunromvec.h \ /usr/include/mon/openprom.h /usr/include/mon/obpdefs.h \ ../xr/XR_sys_signal.h ../xr/XR_sys_socket.h ../posix/sys/socket.h \ ../io/PCR_IOSocket.h ../host/sys/socket.h ../posix/host/sys/sockio.h \ ../posix/host/netinet/in.h ../posix/host/netinet/tcp.h \ ../xr/XR_sys_sockio.h ../posix/sys/sockio.h ../xr/XR_sys_stat.h \ ../xr/XR_sys_time.h /usr/include/sys/time.h ../posix/time.h ../host/time.h XR_UIOImpl.o : XR_UIOImpl.c ../xr/XR_Basics.h ../xr/XR_UIO.h \ ../xr/XR_Threads.h ../th/PCR_Th.h ../config/PCR_Arch.h \ ../config/PCR_StdDefs.h ../config/PCR_StdTypes.h ../sig/PCR_Sig.h \ ../config/PCR_OS.h ../sig/PCR_SigTypes.h ../th/PCR_ThTypes.h \ ../xr/XR_sys_types.h ../xr/XR_errno.h ../posix/errno.h ../host/errno.h \ /usr/include/sys/errno.h ../xr/XR_fcntl.h ../posix/fcntl.h ../host/fcntl.h \ /usr/include/sys/fcntlcom.h /usr/include/sys/stdtypes.h ../posix/sys/stat.h \ ../host/sys/stat.h ../posix/sys/types.h ../posix/host/sys/types.h \ /usr/include/sys/sysmacros.h ../xr/XR_poll.h ../xr/XR_stropts.h \ /import/gnu/lib/gcc-include/stropts.h \ /import/gnu/lib/gcc-include/sys/ioccom.h ../xr/XR_sys_dirent.h \ /usr/include/sys/dirent.h ../xr/XR_sys_fbio.h \ /import/gnu/lib/gcc-include/sun/fbio.h ../xr/XR_sys_file.h \ ../xr/XR_sys_filio.h /import/gnu/lib/gcc-include/sys/filio.h \ ../xr/XR_sys_ipc.h /usr/include/sys/ipc.h ../xr/XR_sys_kbio.h \ /import/gnu/lib/gcc-include/sundev/kbio.h ../xr/XR_sys_mman.h \ ../shm/PCR_ShmBSD.h ../host/sys/mman.h ../xr/XR_sys_shm.h \ /usr/include/sys/shm.h /usr/include/sys/param.h \ /usr/include/machine/param.h /usr/include/sys/signal.h \ /usr/include/vm/faultcode.h /usr/include/machine/mmu.h \ /usr/include/debug/debug.h /usr/include/mon/sunromvec.h \ /usr/include/mon/openprom.h /usr/include/mon/obpdefs.h \ ../xr/XR_sys_signal.h ../xr/XR_sys_socket.h ../posix/sys/socket.h \ ../io/PCR_IOSocket.h ../host/sys/socket.h ../posix/host/sys/sockio.h \ ../posix/host/netinet/in.h ../posix/host/netinet/tcp.h \ ../xr/XR_sys_sockio.h ../posix/sys/sockio.h ../xr/XR_sys_stat.h \ ../xr/XR_sys_time.h /usr/include/sys/time.h ../posix/time.h ../host/time.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 ../base/PCR_Base.h ../base/PCR_BaseArgs.h \ /import/gnu/lib/gcc-include/stdarg.h ../vd/PCR_VD.h ../mm/PCR_MM.h \ ../posix/stddef.h ../posix/host/stddef.h ../io/PCR_IO.h ../posix/dirent.h \ ../posix/host/dirent.h ../posix/utime.h ../host/utime.h ../io/PCR_IOGbl.h \ ../io/PCR_IOGblUFS.h ../host/poll.h ../posix/sys/utsname.h \ ../host/sys/utsname.h ../ansi/string.h /usr/include/net/if.h XR_UIOCompatImpl.o : XR_UIOCompatImpl.c ../config/PCR_OS.h \ ../xr/XR_Basics.h ../xr/XR_UIO.h ../xr/XR_Threads.h ../th/PCR_Th.h \ ../config/PCR_Arch.h ../config/PCR_StdDefs.h ../config/PCR_StdTypes.h \ ../sig/PCR_Sig.h ../sig/PCR_SigTypes.h ../th/PCR_ThTypes.h \ ../xr/XR_sys_types.h ../xr/XR_errno.h ../posix/errno.h ../host/errno.h \ /usr/include/sys/errno.h ../xr/XR_fcntl.h ../posix/fcntl.h ../host/fcntl.h \ /usr/include/sys/fcntlcom.h /usr/include/sys/stdtypes.h ../posix/sys/stat.h \ ../host/sys/stat.h ../posix/sys/types.h ../posix/host/sys/types.h \ /usr/include/sys/sysmacros.h ../xr/XR_poll.h ../xr/XR_stropts.h \ /import/gnu/lib/gcc-include/stropts.h \ /import/gnu/lib/gcc-include/sys/ioccom.h ../xr/XR_sys_dirent.h \ /usr/include/sys/dirent.h ../xr/XR_sys_fbio.h \ /import/gnu/lib/gcc-include/sun/fbio.h ../xr/XR_sys_file.h \ ../xr/XR_sys_filio.h /import/gnu/lib/gcc-include/sys/filio.h \ ../xr/XR_sys_ipc.h /usr/include/sys/ipc.h ../xr/XR_sys_kbio.h \ /import/gnu/lib/gcc-include/sundev/kbio.h ../xr/XR_sys_mman.h \ ../shm/PCR_ShmBSD.h ../host/sys/mman.h ../xr/XR_sys_shm.h \ /usr/include/sys/shm.h /usr/include/sys/param.h \ /usr/include/machine/param.h /usr/include/sys/signal.h \ /usr/include/vm/faultcode.h /usr/include/machine/mmu.h \ /usr/include/debug/debug.h /usr/include/mon/sunromvec.h \ /usr/include/mon/openprom.h /usr/include/mon/obpdefs.h \ ../xr/XR_sys_signal.h ../xr/XR_sys_socket.h ../posix/sys/socket.h \ ../io/PCR_IOSocket.h ../host/sys/socket.h ../posix/host/sys/sockio.h \ ../posix/host/netinet/in.h ../posix/host/netinet/tcp.h \ ../xr/XR_sys_sockio.h ../posix/sys/sockio.h ../xr/XR_sys_stat.h \ ../xr/XR_sys_time.h /usr/include/sys/time.h ../posix/time.h ../host/time.h \ ../ansi/string.h XR_DummiesImpl.o : XR_DummiesImpl.c ../config/PCR_OS.h ../ansi/string.h \ ../posix/sys/types.h ../posix/host/sys/types.h /usr/include/sys/stdtypes.h \ /usr/include/sys/sysmacros.h XR_StackPushTestImpl.o : XR_StackPushTestImpl.c ../th/PCR_Th.h \ ../config/PCR_Arch.h ../config/PCR_StdDefs.h ../config/PCR_StdTypes.h \ ../sig/PCR_Sig.h ../config/PCR_OS.h ../sig/PCR_SigTypes.h \ ../th/PCR_ThTypes.h XR_ThreadsTerminationImpl.o : XR_ThreadsTerminationImpl.c \ ../base/PCR_Base.h ../config/PCR_StdTypes.h ../base/PCR_BaseArgs.h \ /import/gnu/lib/gcc-include/stdarg.h ../mm/PCR_MM.h ../posix/stddef.h \ ../posix/host/stddef.h ../posix/errno.h ../host/errno.h \ /usr/include/sys/errno.h XR_UIOEventsImpl.o : XR_UIOEventsImpl.c ../base/PCR_Base.h \ ../config/PCR_StdTypes.h ../base/PCR_BaseArgs.h \ /import/gnu/lib/gcc-include/stdarg.h ../mm/PCR_MM.h ../posix/stddef.h \ ../posix/host/stddef.h ../sig/PCR_Sig.h ../config/PCR_OS.h \ ../sig/PCR_SigTypes.h ../sig/PCR_SigPvt.h ../th/PCR_ThData.h \ ../config/PCR_Arch.h ../th/PCR_ThTypes.h ../th/PCR_ThPvt.h \ ../th/PCR_ThCtl.h ../th/PCR_ThCtlTypes.h ../posix/limits.h \ ../posix/host/limits.h ../posix/setjmp.h ../host/signal.h \ /usr/include/sys/signal.h /usr/include/vm/faultcode.h \ /usr/include/sys/stdtypes.h ../th/PCR_Th.h ../config/PCR_StdDefs.h \ ../posix/errno.h ../host/errno.h /usr/include/sys/errno.h XR_DummyCirioImpl.o : XR_DummyCirioImpl.c XR_InstallAndRunPackage.o : XR_InstallAndRunPackage.c ../base/PCR_Base.h \ ../config/PCR_StdTypes.h ../base/PCR_BaseArgs.h \ /import/gnu/lib/gcc-include/stdarg.h dummy_malloc.o : dummy_malloc.c ../mm/PCR_MM.h ../config/PCR_StdTypes.h \ ../posix/stddef.h ../posix/host/stddef.h