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.8 1996/11/26 16:02:19 naim
9 # Implementation of cross-compiler (sparc-solaris,x86-solaris)->rs6000 - naim
11 # Revision 1.7 1996/01/05 19:51:52 tamches
14 # Revision 1.6 1995/08/24 15:00:54 hollings
15 # AIX/SP-2 port (including option for split instruction/data heaps)
16 # Tracing of rexec (correctly spawns a paradynd if needed)
17 # Added rtinst function to read getrusage stats (can now be used in metrics)
19 # Improved Error reporting in MDL sematic checks
20 # Fixed MDL Function call statement
21 # Fixed bugs in TK usage (strings passed where UID expected)
23 # Revision 1.5 1995/02/27 17:37:04 jcargill
24 # Added support for suppressing implicit dependency generation
25 # (EXPLICIT_DEPENDS) and removed PD_NO_DEPENDS support
27 # Revision 1.4 1995/02/21 16:34:06 jcargill
28 # Allow module-specific linking and installing where desired
30 # Revision 1.3 1995/02/17 22:19:21 markc
31 # Added defs to build libutilPVM.a
33 # Revision 1.2 1995/01/30 21:26:16 jcargill
34 # Better use of TO_CORE for modules below top-level (e.g. visiClients)
36 # Revision 1.1 1995/01/30 18:08:18 jcargill
37 # Major build system reorganization
44 OBJS = $(patsubst %.C, %.o, $(filter %.C,$(notdir $(SRCS)))) \
45 $(patsubst %.c, %.o, $(filter %.c,$(notdir $(SRCS)))) \
46 $(patsubst %.y, %.o, $(filter %.y,$(notdir $(SRCS)))) \
47 $(patsubst %.l, %.o, $(filter %.l,$(notdir $(SRCS)))) \
48 $(patsubst %.s, %.o, $(filter %.s,$(notdir $(SRCS)))) \
49 $(patsubst %.S, %.o, $(filter %.S,$(notdir $(SRCS)))) \
50 $(IGEN_GEN_SRCS:%.C=%.o)
55 $(AR) crv $(TARGET) $(OBJS)
61 $(AR) crv $(TARGET2) $(OBJS2)
67 DEST = $(TO_CORE)/../lib/$(PLATFORM)
74 rm -f *.o *.[hC] *.a $(TARGET)
76 ifndef UNCOMMON_INSTALL
77 install: $(DEST)/$(TARGET)
79 $(DEST)/$(TARGET): $(TARGET)
81 $(RANLIB) $(DEST)/$(TARGET)
84 # definition for secondary library
87 install: $(DEST)/$(TARGET2)
89 $(DEST)/$(TARGET2): $(TARGET2)
91 $(RANLIB) $(DEST)/$(TARGET2)
93 endif # ifndef UNCOMMON_INSTALL
96 # dependency generation definitions
105 # Define DEPENDS dependencies such that the DEPENDS files depends on
106 # the .I files, not the .[Ch] files; otherwise, DEPENDS get rebuilt
107 # all the time. We do need to build the Igen-generated files before
108 # updating DEPENDS, however,
111 ifdef EXPLICIT_DEPENDS
114 DEPENDS: $(SRCS) $(IGEN_ISRCS)
117 $(MAKE) $(IGEN_GEN_SRCS)
119 $(MODCC) -MM $(MODCFLAGS) $(SRCS) $(IGEN_GEN_SRCS) > DEPENDS
120 # makedepend -fDEPENDS -- $(CFLAGS) $(SRCS) $(IGEN_SRCS) $(NOPED_SRCS)
122 ifdef EXPLICIT_DEPENDS
129 $(MODCC) -MM $(MODCFLAGS) $(SRCS) > DEPENDS
130 # makedepend -fDEPENDS -- $(CFLAGS) $(SRCS)
135 # makedepend -fDEPENDS -- $(CFLAGS) $(SRCS)
141 # A few pattern rules for simplicity in handling igen-generated files.
144 %.xdr.C %.xdr.CLNT.C %.xdr.CLNT.h %.xdr.SRVR.C %.xdr.SRVR.h %.xdr.h: %.I
145 $(IGEN) -xdr $(ICFLAGS) $<
147 %.thread.C %.thread.CLNT.h %.thread.SRVR.h %.thread.h: %.I
148 $(IGEN) -thread $(ICFLAGS) $<
152 # include the dependencies.