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.6 1995/08/24 15:00:54 hollings
9 # AIX/SP-2 port (including option for split instruction/data heaps)
10 # Tracing of rexec (correctly spawns a paradynd if needed)
11 # Added rtinst function to read getrusage stats (can now be used in metrics)
13 # Improved Error reporting in MDL sematic checks
14 # Fixed MDL Function call statement
15 # Fixed bugs in TK usage (strings passed where UID expected)
17 # Revision 1.5 1995/02/27 17:37:04 jcargill
18 # Added support for suppressing implicit dependency generation
19 # (EXPLICIT_DEPENDS) and removed PD_NO_DEPENDS support
21 # Revision 1.4 1995/02/21 16:34:06 jcargill
22 # Allow module-specific linking and installing where desired
24 # Revision 1.3 1995/02/17 22:19:21 markc
25 # Added defs to build libutilPVM.a
27 # Revision 1.2 1995/01/30 21:26:16 jcargill
28 # Better use of TO_CORE for modules below top-level (e.g. visiClients)
30 # Revision 1.1 1995/01/30 18:08:18 jcargill
31 # Major build system reorganization
38 OBJS = $(patsubst %.C, %.o, $(filter %.C,$(notdir $(SRCS)))) \
39 $(patsubst %.c, %.o, $(filter %.c,$(notdir $(SRCS)))) \
40 $(patsubst %.y, %.o, $(filter %.y,$(notdir $(SRCS)))) \
41 $(patsubst %.l, %.o, $(filter %.l,$(notdir $(SRCS)))) \
42 $(patsubst %.s, %.o, $(filter %.s,$(notdir $(SRCS)))) \
43 $(patsubst %.S, %.o, $(filter %.S,$(notdir $(SRCS)))) \
44 $(IGEN_GEN_SRCS:%.C=%.o)
49 ar crv $(TARGET) $(OBJS)
55 ar crv $(TARGET2) $(OBJS2)
61 DEST = $(TO_CORE)/../lib/$(PLATFORM)
68 rm -f *.o *.[hC] *.a $(TARGET)
70 ifndef UNCOMMON_INSTALL
71 install: $(DEST)/$(TARGET)
73 $(DEST)/$(TARGET): $(TARGET)
75 $(RANLIB) $(DEST)/$(TARGET)
78 # definition for secondary library
81 install: $(DEST)/$(TARGET2)
83 $(DEST)/$(TARGET2): $(TARGET2)
85 $(RANLIB) $(DEST)/$(TARGET2)
87 endif # ifndef UNCOMMON_INSTALL
90 # dependency generation definitions
99 # Define DEPENDS dependencies such that the DEPENDS files depends on
100 # the .I files, not the .[Ch] files; otherwise, DEPENDS get rebuilt
101 # all the time. We do need to build the Igen-generated files before
102 # updating DEPENDS, however,
105 ifdef EXPLICIT_DEPENDS
108 DEPENDS: $(SRCS) $(IGEN_ISRCS)
111 $(MAKE) $(IGEN_GEN_SRCS)
113 $(MODCC) -MM $(MODCFLAGS) $(SRCS) $(IGEN_GEN_SRCS) > DEPENDS
114 # makedepend -fDEPENDS -- $(CFLAGS) $(SRCS) $(IGEN_SRCS) $(NOPED_SRCS)
116 ifdef EXPLICIT_DEPENDS
123 $(MODCC) -MM $(MODCFLAGS) $(SRCS) > DEPENDS
124 # makedepend -fDEPENDS -- $(CFLAGS) $(SRCS)
129 # makedepend -fDEPENDS -- $(CFLAGS) $(SRCS)
136 # A few pattern rules for simplicity in handling igen-generated files.
139 %.xdr.C %.xdr.CLNT.C %.xdr.CLNT.h %.xdr.SRVR.C %.xdr.SRVR.h %.xdr.h: %.I
140 igen -xdr $(ICFLAGS) $<
142 %.thread.C %.thread.CLNT.h %.thread.SRVR.h %.thread.h: %.I
143 igen -thread $(ICFLAGS) $<
147 # include the dependencies.