Dyninst API library now uses fork() instead of vfork() when creating
[dyninst.git] / nmake.program.tmpl
1 #
2 # This file defines the things that should be common to all "programs"
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.program.tmpl,v $
8 # Revision 1.1  1997/05/23 23:04:54  mjrg
9 # Windows NT port
10 #
11 #
12
13
14 !ifndef UNCOMMON_LINK
15 $(TARGET): $(OBJS)
16         link -out:$(TARGET) -debug $(LDFLAGS) $(OBJS) $(LIBDIR) $(LIBS) $(SYSLIBS)
17 !endif
18
19 #!ifndef UNCOMMON_LINK
20 # The user may set APP_PURE_OPTIONS for application-specific purify options
21 #pure: $(OBJS) $(LIBS)
22 #       purify $(APP_PURE_OPTIONS) -cache-dir=/tmp -$(MODCC) -collector=$(COLLECTOR) $(MODCC) -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBDIR) $(LIBS) $(SYSLIBS)
23 #!endif
24
25 #!ifndef UNCOMMON_LINK
26 #quantify: $(OBJS) $(LIBS)
27 #       quantify -cache-dir=/tmp -$(MODCC) -collector=$(COLLECTOR) $(MODCC) -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBDIR) $(LIBS) $(SYSLIBS)
28 #!endif
29
30 #!ifndef UNCOMMON_LINK
31 #qpt: $(OBJS) $(LIBS)
32 #       $(MODCC) -static -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBDIR) $(LIBS) $(SYSLIBS)
33 #       # qpt's quick profiling may produce incorrect results in programs
34 #       # executing interprocedural jumps; this includes setjmp/longjmp.
35 #       # Hence we must use the -s option for paradyn:
36 #       qpt2 -s $(TARGET)
37 #!endif
38
39 !ifndef DEST
40 DEST            = $(TO_CORE)\..\bin\$(PLATFORM)
41 !endif
42
43 VPATH           = $(VPATH) ../src:$(TO_CORE)/../lib/$(PLATFORM):$(BACKUP_CORE)/../lib/$(PLATFORM)
44
45
46 echo:
47         echo $(VPATH)
48
49 clean:
50         del *.obj  *.ilk *.pdb *.h *.C $(TARGET)
51
52 install:  $(DEST)\$(TARGET)
53
54 $(DEST)\$(TARGET): $(TARGET)
55         copy $(TARGET) $(DEST)
56
57 #.PHONY : depend
58 #depend:
59 #       rm -f DEPENDS
60 #       $(MAKE) DEPENDS
61
62
63 # Define DEPENDS dependencies such that the DEPENDS files depends on
64 # the .I files, not the .[Ch] files; otherwise, DEPENDS get rebuilt
65 # all the time.  We do need to build the Igen-generated files before
66 # updating DEPENDS, however,
67 #
68 #!ifdef IGEN_ISRCS
69 #!ifdef EXPLICIT_DEPENDS
70 #DEPENDS:
71 #!else
72 #DEPENDS: $(SRCS) $(IGEN_ISRCS)
73 #!endif
74 #       touch DEPENDS
75 #       $(MAKE) $(IGEN_GEN_SRCS)
76 #       $(MAKE) $(SRCS)
77 #       $(MODCC) -MM $(MODCFLAGS) $(SRCS) $(IGEN_GEN_SRCS) > DEPENDS
78 ##      makedepend -fDEPENDS -- $(CFLAGS) $(SRCS) $(IGEN_SRCS) $(NOPED_SRCS)
79 #!else
80 #!ifdef EXPLICIT_DEPENDS
81 #ADEPENDS:
82 #!else
83 #DEPENDS: $(SRCS)
84 #!endif
85 #       touch DEPENDS
86 #       $(MAKE) $(SRCS)
87 #       $(MODCC) -MM $(MODCFLAGS) $(SRCS) > DEPENDS
88 ##      makedepend -fDEPENDS -- $(CFLAGS) $(SRCS)
89 #!endif
90
91
92
93 # A few pattern rules for simplicity.  The default lex rule is
94 # redefined, just for the sake of cleanliness.  More important are the
95 # igen rules; they "automatically" pick the correct type of igen to
96 # run.  Actually, we can't do this completely "right" unless igen is
97 # changed to generate different output files for the various type of
98 # interfaces.
99 #
100
101 {..\src\}.C.obj:
102         $(CXX) $(CXXFLAGS) -c $<
103
104 .C.obj:
105         $(CXX) $(CXXFLAGS) -c $<
106
107 {..\src\}.y.C:
108         $(YACC) $(YFLAGS) $<
109         del $@
110         move y.tab.c $@
111
112 {..\src\}.y.obj:
113         $(YACC) $(YFLAGS) $<
114         del $@
115         move y.tab.c $@
116         $(CXX) $(CXXFLAGS) -c $<
117
118
119 #%.C: %.y
120 #       $(YACC) $(YFLAGS) $<
121 #       mv y.tab.c $@
122
123 %.C: %.l
124         $(LEX) -t $(LFLAGS) $< > $@
125
126 %.xdr.C %.xdr.CLNT.C %.xdr.CLNT.h %.xdr.SRVR.C %.xdr.SRVR.h %.xdr.h: %.I
127         $(IGEN) -xdr $(ICFLAGS) $<
128
129 %.thread.C %.thread.CLNT.h %.thread.SRVR.h %.thread.h: %.I
130         $(IGEN) -thread $(ICFLAGS) $<
131
132 #
133 # include the dependencies.
134 #
135 !include DEPENDS