Dyninst API library now uses fork() instead of vfork() when creating
[dyninst.git] / nmake.library.tmpl
1 #
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.
6
7 # $Log: nmake.library.tmpl,v $
8 # Revision 1.1  1997/05/23 23:04:53  mjrg
9 # Windows NT port
10 #
11 #
12 #
13
14
15 VPATH           = $(VPATH) ../src
16
17 !ifndef UNCOMMON_LINK
18 $(TARGET): $(OBJS)
19         @rm -f $(TARGET)
20         lib -out:$*.lib $(OBJS)
21 #       $(RANLIB) $(TARGET)
22
23 !ifdef TARGET2
24 $(TARGET2): $(OBJS2)
25         @rm -f $(TARGET2)
26         ar crv $(TARGET2) $(OBJS2)
27         $(RANLIB) $(TARGET2)
28 !endif  # TARGET2
29 !endif  # UNCOMMON_LINK
30
31 !ifndef DEST
32 DEST            = $(TO_CORE)\..\lib\$(PLATFORM)
33 !endif
34
35 echo:
36         echo $(OBJS)
37
38 clean:
39         del *.obj *.h *.C *.lib $(TARGET)
40
41 !ifndef UNCOMMON_INSTALL
42 install: $(DEST)/$(TARGET)
43
44 $(DEST)/$(TARGET):  $(TARGET)
45         copy $(TARGET) $(DEST)
46 #       $(RANLIB) $(DEST)/$(TARGET)
47
48 #
49 # definition for secondary library
50 #
51 !ifdef TARGET2
52 install: $(DEST)/$(TARGET2)
53
54 $(DEST)/$(TARGET2):  $(TARGET2)
55         cp $(TARGET2) $(DEST)
56         $(RANLIB) $(DEST)/$(TARGET2)
57 !endif
58 !endif      # ifndef UNCOMMON_INSTALL
59
60 #
61 # dependency generation definitions
62 #
63
64 #.PHONY : depend
65 #depend:
66 #       rm -f DEPENDS
67 #       $(MAKE) DEPENDS
68
69
70 # Define DEPENDS dependencies such that the DEPENDS files depends on
71 # the .I files, not the .[Ch] files; otherwise, DEPENDS get rebuilt
72 # all the time.  We do need to build the Igen-generated files before
73 # updating DEPENDS, however,
74 #
75 #!ifdef IGEN_ISRCS
76 #!ifdef EXPLICIT_DEPENDS
77 #DEPENDS:
78 #!else
79 #DEPENDS: $(SRCS) $(IGEN_ISRCS)
80 #!endif
81 #       touch DEPENDS
82 #       $(MAKE) $(IGEN_GEN_SRCS)
83 #       $(MAKE) $(SRCS)
84 #       $(MODCC) -MM $(MODCFLAGS) $(SRCS) $(IGEN_GEN_SRCS) > DEPENDS
85 ##       makedepend -fDEPENDS -- $(CFLAGS) $(SRCS) $(IGEN_SRCS) $(NOPED_SRCS)
86 #!else
87 #!ifdef EXPLICIT_DEPENDS
88 #DEPENDS:
89 #!else
90 #DEPENDS: $(SRCS)
91 #!endif
92 #       touch DEPENDS
93 #       $(MAKE) $(SRCS)
94 #       $(MODCC) -MM $(MODCFLAGS) $(SRCS) > DEPENDS
95 ##       makedepend -fDEPENDS -- $(CFLAGS) $(SRCS)
96 #!endif
97
98
99 #.depend.% %.C:
100 #       makedepend -fDEPENDS -- $(CFLAGS) $(SRCS)
101
102 pure:
103
104
105
106 #
107 # A few pattern rules for simplicity in handling igen-generated files.
108 #
109
110 %.xdr.C %.xdr.CLNT.C %.xdr.CLNT.h %.xdr.SRVR.C %.xdr.SRVR.h %.xdr.h: %.I
111         $(IGEN) -xdr $(ICFLAGS) $<
112
113 %.thread.C %.thread.CLNT.h %.thread.SRVR.h %.thread.h: %.I
114         $(IGEN) -thread $(ICFLAGS) $<
115
116
117 {..\src\}.C.obj:
118         $(CXX) $(CXXFLAGS) -c $<
119
120 .C.obj:
121         $(CXX) $(CXXFLAGS) -c $<
122
123 {..\src\}.y.C:
124         $(YACC) $(YFLAGS) $<
125         del $@
126         move y.tab.c $@
127
128 {..\src\}.y.obj:
129         $(YACC) $(YFLAGS) $<
130         del $@
131         move y.tab.c $@
132         $(CXX) $(CXXFLAGS) -c $<
133
134
135
136 #
137 # include the dependencies.
138 #
139 !include DEPENDS
140