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.
7 # $Id: nmake.program.tmpl,v 1.7 2003/03/13 17:20:57 pcroth Exp $
10 BUILD_ID= -s $(SUITE_NAME) -v $(RELEASE_NUM)$(BUILD_MARK)$(BUILD_NUM)
13 DEST = $(TO_CORE)\$(PROGRAM_DEST)
17 XTARGET = $(TARGET:.exe=)
18 VOUCHER = V_$(XTARGET)
21 @echo Updating build voucher information: $(VOUCHER)
22 $(BUILDSTAMP) $(BUILD_ID) $(XTARGET)
23 $(CC) -c -Tc $(VOUCHER).c
30 $(LINK) -out:$(TARGET) -debug -pdb:none $(LDFLAGS) $(VOUCHER).obj $(OBJS) $(LIBDIR) $(LIBS) $(SYSLIBS)
34 #!ifndef UNCOMMON_LINK
35 # The user may set APP_PURE_OPTIONS for application-specific purify options
36 #pure: $(OBJS) $(LIBS)
37 # purify $(APP_PURE_OPTIONS) -cache-dir=/tmp -$(MODCC) -collector=$(COLLECTOR) $(MODCC) -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBDIR) $(LIBS) $(SYSLIBS)
40 #!ifndef UNCOMMON_LINK
41 #quantify: $(OBJS) $(LIBS)
42 # quantify -cache-dir=/tmp -$(MODCC) -collector=$(COLLECTOR) $(MODCC) -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBDIR) $(LIBS) $(SYSLIBS)
45 #!ifndef UNCOMMON_LINK
47 # $(MODCC) -static -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBDIR) $(LIBS) $(SYSLIBS)
48 # # qpt's quick profiling may produce incorrect results in programs
49 # # executing interprocedural jumps; this includes setjmp/longjmp.
50 # # Hence we must use the -s option for paradyn:
54 VPATH = $(VPATH) ../src:$(TO_CORE)\$(LIBRARY_DEST):$(TO_CORE)/../lib/$(PLATFORM):$(BACKUP_CORE)/../lib/$(PLATFORM):$(TO_CORE)/visiClients/auxiliary/src
60 -$(RM) *.obj *.ilk *.pdb *.h *.C $(TARGET) $(TARGETS)
62 !ifndef UNCOMMON_INSTALL
63 install: $(DEST)\$(TARGET)
65 $(DEST)\$(TARGET): $(TARGET)
66 $(CP) $(TARGET) $(DEST)
75 # Define DEPENDS dependencies such that the DEPENDS files depends on
76 # the .I files, not the .[Ch] files; otherwise, DEPENDS get rebuilt
77 # all the time. We do need to build the Igen-generated files before
78 # updating DEPENDS, however,
81 #!ifdef EXPLICIT_DEPENDS
84 #DEPENDS: $(SRCS) $(IGEN_ISRCS)
87 # $(MAKE) $(IGEN_GEN_SRCS)
89 # $(MODCC) -MM $(MODCFLAGS) $(SRCS) $(IGEN_GEN_SRCS) > DEPENDS
90 ## makedepend -fDEPENDS -- $(CFLAGS) $(SRCS) $(IGEN_SRCS) $(NOPED_SRCS)
92 #!ifdef EXPLICIT_DEPENDS
99 # $(MODCC) -MM $(MODCFLAGS) $(SRCS) > DEPENDS
100 ## makedepend -fDEPENDS -- $(CFLAGS) $(SRCS)
105 # A few pattern rules for simplicity. The default lex rule is
106 # redefined, just for the sake of cleanliness. More important are the
107 # igen rules; they "automatically" pick the correct type of igen to
108 # run. Actually, we can't do this completely "right" unless igen is
109 # changed to generate different output files for the various type of
114 $(CXX) $(CXXFLAGS) -c $<
117 $(CXX) $(CXXFLAGS) -c $<
128 $(CXX) $(CXXFLAGS) -c $<
132 # $(YACC) $(YFLAGS) $<
136 $(LEX) -t $(LFLAGS) $< > $@
138 %.xdr.C %.xdr.CLNT.C %.xdr.CLNT.h %.xdr.SRVR.C %.xdr.SRVR.h %.xdr.h: %.I
139 $(IGEN) -xdr $(ICFLAGS) $<
141 %.thread.C %.thread.CLNT.h %.thread.SRVR.h %.thread.h: %.I
142 $(IGEN) -thread $(ICFLAGS) $<
145 # include the dependencies.