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.5 1999/05/31 20:14:54 wylie 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)
61 $(RM) *.obj *.ilk *.pdb *.h *.C $(TARGET) $(TARGETS)
63 !ifndef UNCOMMON_INSTALL
64 install: $(DEST)\$(TARGET)
66 $(DEST)\$(TARGET): $(TARGET)
67 $(CP) $(TARGET) $(DEST)
76 # Define DEPENDS dependencies such that the DEPENDS files depends on
77 # the .I files, not the .[Ch] files; otherwise, DEPENDS get rebuilt
78 # all the time. We do need to build the Igen-generated files before
79 # updating DEPENDS, however,
82 #!ifdef EXPLICIT_DEPENDS
85 #DEPENDS: $(SRCS) $(IGEN_ISRCS)
88 # $(MAKE) $(IGEN_GEN_SRCS)
90 # $(MODCC) -MM $(MODCFLAGS) $(SRCS) $(IGEN_GEN_SRCS) > DEPENDS
91 ## makedepend -fDEPENDS -- $(CFLAGS) $(SRCS) $(IGEN_SRCS) $(NOPED_SRCS)
93 #!ifdef EXPLICIT_DEPENDS
100 # $(MODCC) -MM $(MODCFLAGS) $(SRCS) > DEPENDS
101 ## makedepend -fDEPENDS -- $(CFLAGS) $(SRCS)
106 # A few pattern rules for simplicity. The default lex rule is
107 # redefined, just for the sake of cleanliness. More important are the
108 # igen rules; they "automatically" pick the correct type of igen to
109 # run. Actually, we can't do this completely "right" unless igen is
110 # changed to generate different output files for the various type of
115 $(CXX) $(CXXFLAGS) -c $<
118 $(CXX) $(CXXFLAGS) -c $<
129 $(CXX) $(CXXFLAGS) -c $<
133 # $(YACC) $(YFLAGS) $<
137 $(LEX) -t $(LFLAGS) $< > $@
139 %.xdr.C %.xdr.CLNT.C %.xdr.CLNT.h %.xdr.SRVR.C %.xdr.SRVR.h %.xdr.h: %.I
140 $(IGEN) -xdr $(ICFLAGS) $<
142 %.thread.C %.thread.CLNT.h %.thread.SRVR.h %.thread.h: %.I
143 $(IGEN) -thread $(ICFLAGS) $<
146 # include the dependencies.