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 # $Id: nmake.library.tmpl,v 1.7 2001/02/01 01:07:25 schendel Exp $
10 BUILD_ID= -s $(SUITE_NAME) -v $(RELEASE_NUM)$(BUILD_MARK)$(BUILD_NUM)
12 XTARGET = $(TARGET:.lib=)
13 XTARGET = $(XTARGET:.dll=)
14 VOUCHER = V_$(XTARGET)
17 @echo Updating build voucher information: $(VOUCHER)
18 $(BUILDSTAMP) $(BUILD_ID) $(XTARGET)
21 VPATH = $(VPATH) ../src
27 $(LINK) -lib $(LDFLAGS) -out:$*.lib $(VOUCHER).obj $(OBJS) $(SYSLIBS)
33 $(AR) crv $(TARGET2) $(VOUCHER).obj $(OBJS2)
36 !endif # UNCOMMON_LINK
39 DEST = $(TO_CORE)\$(LIBRARY_DEST)
46 $(RM) *.obj *.h *.C *.lib *.exp *.pdb $(TARGET)
48 !ifndef UNCOMMON_INSTALL
49 install: $(DEST)/$(TARGET)
51 $(DEST)/$(TARGET): $(TARGET)
52 $(CP) $(TARGET) $(DEST)
53 # $(RANLIB) $(DEST)/$(TARGET)
56 # definition for secondary library
59 install: $(DEST)/$(TARGET2)
61 $(DEST)/$(TARGET2): $(TARGET2)
62 $(CP) $(TARGET2) $(DEST)
63 $(RANLIB) $(DEST)/$(TARGET2)
65 !endif # ifndef UNCOMMON_INSTALL
68 # dependency generation definitions
77 # Define DEPENDS dependencies such that the DEPENDS files depends on
78 # the .I files, not the .[Ch] files; otherwise, DEPENDS get rebuilt
79 # all the time. We do need to build the Igen-generated files before
80 # updating DEPENDS, however,
83 #!ifdef EXPLICIT_DEPENDS
86 #DEPENDS: $(SRCS) $(IGEN_ISRCS)
89 # $(MAKE) $(IGEN_GEN_SRCS)
91 # $(MODCC) -MM $(MODCFLAGS) $(SRCS) $(IGEN_GEN_SRCS) > DEPENDS
92 ## makedepend -fDEPENDS -- $(CFLAGS) $(SRCS) $(IGEN_SRCS) $(NOPED_SRCS)
94 #!ifdef EXPLICIT_DEPENDS
101 # $(MODCC) -MM $(MODCFLAGS) $(SRCS) > DEPENDS
102 ## makedepend -fDEPENDS -- $(CFLAGS) $(SRCS)
107 # makedepend -fDEPENDS -- $(CFLAGS) $(SRCS)
114 # A few pattern rules for simplicity in handling igen-generated files.
117 %.xdr.C %.xdr.CLNT.C %.xdr.CLNT.h %.xdr.SRVR.C %.xdr.SRVR.h %.xdr.h: %.I
118 $(IGEN) -xdr $(ICFLAGS) $<
120 %.thread.C %.thread.CLNT.h %.thread.SRVR.h %.thread.h: %.I
121 $(IGEN) -thread $(ICFLAGS) $<
125 $(CXX) $(CXXFLAGS) -c $<
128 $(CXX) $(CXXFLAGS) -c $<
139 $(CXX) $(CXXFLAGS) -c $<
144 # include the dependencies.