2 # This file defines the things that should be common to all "libraries"
3 # in the paradyn build tree. It depends on things like SRCS and
4 # TARGET being set correctly in the module-specific template and the
5 # architecture-specific Makefile.
7 # $Log: make.library.tmpl,v $
8 # Revision 1.7 1996/01/05 19:51:52 tamches
11 # Revision 1.6 1995/08/24 15:00:54 hollings
12 # AIX/SP-2 port (including option for split instruction/data heaps)
13 # Tracing of rexec (correctly spawns a paradynd if needed)
14 # Added rtinst function to read getrusage stats (can now be used in metrics)
16 # Improved Error reporting in MDL sematic checks
17 # Fixed MDL Function call statement
18 # Fixed bugs in TK usage (strings passed where UID expected)
20 # Revision 1.5 1995/02/27 17:37:04 jcargill
21 # Added support for suppressing implicit dependency generation
22 # (EXPLICIT_DEPENDS) and removed PD_NO_DEPENDS support
24 # Revision 1.4 1995/02/21 16:34:06 jcargill
25 # Allow module-specific linking and installing where desired
27 # Revision 1.3 1995/02/17 22:19:21 markc
28 # Added defs to build libutilPVM.a
30 # Revision 1.2 1995/01/30 21:26:16 jcargill
31 # Better use of TO_CORE for modules below top-level (e.g. visiClients)
33 # Revision 1.1 1995/01/30 18:08:18 jcargill
34 # Major build system reorganization
41 OBJS = $(patsubst %.C, %.o, $(filter %.C,$(notdir $(SRCS)))) \
42 $(patsubst %.c, %.o, $(filter %.c,$(notdir $(SRCS)))) \
43 $(patsubst %.y, %.o, $(filter %.y,$(notdir $(SRCS)))) \
44 $(patsubst %.l, %.o, $(filter %.l,$(notdir $(SRCS)))) \
45 $(patsubst %.s, %.o, $(filter %.s,$(notdir $(SRCS)))) \
46 $(patsubst %.S, %.o, $(filter %.S,$(notdir $(SRCS)))) \
47 $(IGEN_GEN_SRCS:%.C=%.o)
52 ar crv $(TARGET) $(OBJS)
58 ar crv $(TARGET2) $(OBJS2)
64 DEST = $(TO_CORE)/../lib/$(PLATFORM)
71 rm -f *.o *.[hC] *.a $(TARGET)
73 ifndef UNCOMMON_INSTALL
74 install: $(DEST)/$(TARGET)
76 $(DEST)/$(TARGET): $(TARGET)
78 $(RANLIB) $(DEST)/$(TARGET)
81 # definition for secondary library
84 install: $(DEST)/$(TARGET2)
86 $(DEST)/$(TARGET2): $(TARGET2)
88 $(RANLIB) $(DEST)/$(TARGET2)
90 endif # ifndef UNCOMMON_INSTALL
93 # dependency generation definitions
102 # Define DEPENDS dependencies such that the DEPENDS files depends on
103 # the .I files, not the .[Ch] files; otherwise, DEPENDS get rebuilt
104 # all the time. We do need to build the Igen-generated files before
105 # updating DEPENDS, however,
108 ifdef EXPLICIT_DEPENDS
111 DEPENDS: $(SRCS) $(IGEN_ISRCS)
114 $(MAKE) $(IGEN_GEN_SRCS)
116 $(MODCC) -MM $(MODCFLAGS) $(SRCS) $(IGEN_GEN_SRCS) > DEPENDS
117 # makedepend -fDEPENDS -- $(CFLAGS) $(SRCS) $(IGEN_SRCS) $(NOPED_SRCS)
119 ifdef EXPLICIT_DEPENDS
126 $(MODCC) -MM $(MODCFLAGS) $(SRCS) > DEPENDS
127 # makedepend -fDEPENDS -- $(CFLAGS) $(SRCS)
132 # makedepend -fDEPENDS -- $(CFLAGS) $(SRCS)
139 # A few pattern rules for simplicity in handling igen-generated files.
142 %.xdr.C %.xdr.CLNT.C %.xdr.CLNT.h %.xdr.SRVR.C %.xdr.SRVR.h %.xdr.h: %.I
143 $(IGEN) -xdr $(ICFLAGS) $<
145 %.thread.C %.thread.CLNT.h %.thread.SRVR.h %.thread.h: %.I
146 $(IGEN) -thread $(ICFLAGS) $<
150 # include the dependencies.