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.2 1995/01/30 21:26:16 jcargill
9 # Better use of TO_CORE for modules below top-level (e.g. visiClients)
11 # Revision 1.1 1995/01/30 18:08:18 jcargill
12 # Major build system reorganization
19 OBJS = $(patsubst %.C, %.o, $(filter %.C,$(notdir $(SRCS)))) \
20 $(patsubst %.c, %.o, $(filter %.c,$(notdir $(SRCS)))) \
21 $(patsubst %.y, %.o, $(filter %.y,$(notdir $(SRCS)))) \
22 $(patsubst %.l, %.o, $(filter %.l,$(notdir $(SRCS)))) \
23 $(patsubst %.s, %.o, $(filter %.s,$(notdir $(SRCS)))) \
24 $(IGEN_GEN_SRCS:%.C=%.o)
28 ar crv $(TARGET) $(OBJS)
32 DEST = $(TO_CORE)/../lib/$(PLATFORM)
39 rm -f *.o *.[hC] *.a $(TARGET)
41 ifndef UNCOMMON_INSTALL
42 install: $(DEST)/$(TARGET)
45 $(DEST)/$(TARGET): $(TARGET)
47 $(RANLIB) $(DEST)/$(TARGET)
50 # definition for secondary library
53 install: $(DEST)/$(TARGET2)
55 $(DEST)/$(TARGET2): $(TARGET2)
57 $(RANLIB) $(DEST)/$(TARGET2)
61 # dependency generation definitions
67 # Define DEPENDS dependencies such that the DEPENDS files depends on
68 # the .I files, not the .[Ch] files; otherwise, DEPENDS get rebuilt
69 # all the time. We do need to build the Igen-generated files before
70 # updating DEPENDS, however,
73 DEPENDS: $(SRCS) $(IGEN_ISRCS)
75 $(MAKE) $(IGEN_GEN_SRCS)
76 $(MODCC) -MM $(MODCFLAGS) $(SRCS) $(IGEN_SRCS) $(NOPED_SRCS) > DEPENDS
77 # makedepend -fDEPENDS -- $(CFLAGS) $(SRCS) $(IGEN_SRCS) $(NOPED_SRCS)
81 $(MODCC) -MM $(MODCFLAGS) $(SRCS) $(IGEN_SRCS) $(NOPED_SRCS) > DEPENDS
82 # makedepend -fDEPENDS -- $(CFLAGS) $(SRCS)
87 # makedepend -fDEPENDS -- $(CFLAGS) $(SRCS)
94 # A few pattern rules for simplicity in handling igen-generated files.
97 %.xdr.C %.xdr.CLNT.C %.xdr.CLNT.h %.xdr.SRVR.C %.xdr.SRVR.h %.xdr.h: %.I
98 igen -xdr $(ICFLAGS) $<
100 %.thread.C %.thread.CLNT.h %.thread.SRVR.h %.thread.h: %.I
101 igen -thread $(ICFLAGS) $<
105 # include the dependencies.