# # This file defines the things that should be common to all "libraries" # in the paradyn build tree. It depends on things like SRCS and # TARGET being set correctly in the module-specific template and the # architecture-specific Makefile. # # $Log: make.library.tmpl,v $ # Revision 1.6 1995/08/24 15:00:54 hollings # AIX/SP-2 port (including option for split instruction/data heaps) # Tracing of rexec (correctly spawns a paradynd if needed) # Added rtinst function to read getrusage stats (can now be used in metrics) # Critical Path # Improved Error reporting in MDL sematic checks # Fixed MDL Function call statement # Fixed bugs in TK usage (strings passed where UID expected) # # Revision 1.5 1995/02/27 17:37:04 jcargill # Added support for suppressing implicit dependency generation # (EXPLICIT_DEPENDS) and removed PD_NO_DEPENDS support # # Revision 1.4 1995/02/21 16:34:06 jcargill # Allow module-specific linking and installing where desired # # Revision 1.3 1995/02/17 22:19:21 markc # Added defs to build libutilPVM.a # # Revision 1.2 1995/01/30 21:26:16 jcargill # Better use of TO_CORE for modules below top-level (e.g. visiClients) # # Revision 1.1 1995/01/30 18:08:18 jcargill # Major build system reorganization # # VPATH += ../src OBJS = $(patsubst %.C, %.o, $(filter %.C,$(notdir $(SRCS)))) \ $(patsubst %.c, %.o, $(filter %.c,$(notdir $(SRCS)))) \ $(patsubst %.y, %.o, $(filter %.y,$(notdir $(SRCS)))) \ $(patsubst %.l, %.o, $(filter %.l,$(notdir $(SRCS)))) \ $(patsubst %.s, %.o, $(filter %.s,$(notdir $(SRCS)))) \ $(patsubst %.S, %.o, $(filter %.S,$(notdir $(SRCS)))) \ $(IGEN_GEN_SRCS:%.C=%.o) ifndef UNCOMMON_LINK $(TARGET): $(OBJS) @rm -f $(TARGET) ar crv $(TARGET) $(OBJS) $(RANLIB) $(TARGET) ifdef TARGET2 $(TARGET2): $(OBJS2) @rm -f $(TARGET2) ar crv $(TARGET2) $(OBJS2) $(RANLIB) $(TARGET2) endif # TARGET2 endif # UNCOMMON_LINK ifndef DEST DEST = $(TO_CORE)/../lib/$(PLATFORM) endif echo: echo $(OBJS) clean: rm -f *.o *.[hC] *.a $(TARGET) ifndef UNCOMMON_INSTALL install: $(DEST)/$(TARGET) $(DEST)/$(TARGET): $(TARGET) cp $(TARGET) $(DEST) $(RANLIB) $(DEST)/$(TARGET) # # definition for secondary library # ifdef TARGET2 install: $(DEST)/$(TARGET2) $(DEST)/$(TARGET2): $(TARGET2) cp $(TARGET2) $(DEST) $(RANLIB) $(DEST)/$(TARGET2) endif endif # ifndef UNCOMMON_INSTALL # # dependency generation definitions # .PHONY : depend depend: rm -f DEPENDS $(MAKE) DEPENDS # # Define DEPENDS dependencies such that the DEPENDS files depends on # the .I files, not the .[Ch] files; otherwise, DEPENDS get rebuilt # all the time. We do need to build the Igen-generated files before # updating DEPENDS, however, # ifdef IGEN_ISRCS ifdef EXPLICIT_DEPENDS DEPENDS: else DEPENDS: $(SRCS) $(IGEN_ISRCS) endif touch DEPENDS $(MAKE) $(IGEN_GEN_SRCS) $(MAKE) $(SRCS) $(MODCC) -MM $(MODCFLAGS) $(SRCS) $(IGEN_GEN_SRCS) > DEPENDS # makedepend -fDEPENDS -- $(CFLAGS) $(SRCS) $(IGEN_SRCS) $(NOPED_SRCS) else ifdef EXPLICIT_DEPENDS DEPENDS: else DEPENDS: $(SRCS) endif touch DEPENDS $(MAKE) $(SRCS) $(MODCC) -MM $(MODCFLAGS) $(SRCS) > DEPENDS # makedepend -fDEPENDS -- $(CFLAGS) $(SRCS) endif #.depend.% %.C: # makedepend -fDEPENDS -- $(CFLAGS) $(SRCS) pure: # # A few pattern rules for simplicity in handling igen-generated files. # %.xdr.C %.xdr.CLNT.C %.xdr.CLNT.h %.xdr.SRVR.C %.xdr.SRVR.h %.xdr.h: %.I igen -xdr $(ICFLAGS) $< %.thread.C %.thread.CLNT.h %.thread.SRVR.h %.thread.h: %.I igen -thread $(ICFLAGS) $< # # include the dependencies. # include DEPENDS