# # This file defines the things that should be common to all "programs" # in the paradyn build tree. It depends on things like SRCS and # TARGET being set correctly in the module-specific template and the # architecture-specific Makefile. # # $Id: nmake.program.tmpl,v 1.6 2001/11/07 05:03:12 darnold Exp $ # BUILD_ID= -s $(SUITE_NAME) -v $(RELEASE_NUM)$(BUILD_MARK)$(BUILD_NUM) !ifndef DEST DEST = $(TO_CORE)\$(PROGRAM_DEST) !endif !ifndef TARGETS XTARGET = $(TARGET:.exe=) VOUCHER = V_$(XTARGET) $(VOUCHER): @echo Updating build voucher information: $(VOUCHER) $(BUILDSTAMP) $(BUILD_ID) $(XTARGET) $(CC) -c -Tc $(VOUCHER).c !endif !ifndef UNCOMMON_LINK !ifdef TARGET $(TARGET): $(OBJS) @$(MAKE) $(VOUCHER) $(LINK) -out:$(TARGET) -debug -pdb:none $(LDFLAGS) $(VOUCHER).obj $(OBJS) $(LIBDIR) $(LIBS) $(SYSLIBS) !endif !endif #!ifndef UNCOMMON_LINK # The user may set APP_PURE_OPTIONS for application-specific purify options #pure: $(OBJS) $(LIBS) # purify $(APP_PURE_OPTIONS) -cache-dir=/tmp -$(MODCC) -collector=$(COLLECTOR) $(MODCC) -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBDIR) $(LIBS) $(SYSLIBS) #!endif #!ifndef UNCOMMON_LINK #quantify: $(OBJS) $(LIBS) # quantify -cache-dir=/tmp -$(MODCC) -collector=$(COLLECTOR) $(MODCC) -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBDIR) $(LIBS) $(SYSLIBS) #!endif #!ifndef UNCOMMON_LINK #qpt: $(OBJS) $(LIBS) # $(MODCC) -static -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBDIR) $(LIBS) $(SYSLIBS) # # qpt's quick profiling may produce incorrect results in programs # # executing interprocedural jumps; this includes setjmp/longjmp. # # Hence we must use the -s option for paradyn: # qpt2 -s $(TARGET) #!endif VPATH = $(VPATH) ../src:$(TO_CORE)\$(LIBRARY_DEST):$(TO_CORE)/../lib/$(PLATFORM):$(BACKUP_CORE)/../lib/$(PLATFORM):$(TO_CORE)/visiClients/auxiliary/src echo: echo $(VPATH) clean: $(RM) *.obj *.ilk *.pdb *.h *.C $(TARGET) $(TARGETS) !ifndef UNCOMMON_INSTALL install: $(DEST)\$(TARGET) $(DEST)\$(TARGET): $(TARGET) $(CP) $(TARGET) $(DEST) !endif #.PHONY : depend #depend: # $(RM) DEPENDS # $(MAKE) DEPENDS # # Define DEPENDS dependencies such that the DEPENDS files depends on # the .I files, not the .[Ch] files; otherwise, DEPENDS get rebuilt # all the time. We do need to build the Igen-generated files before # updating DEPENDS, however, # #!ifdef IGEN_ISRCS #!ifdef EXPLICIT_DEPENDS #DEPENDS: #!else #DEPENDS: $(SRCS) $(IGEN_ISRCS) #!endif # touch DEPENDS # $(MAKE) $(IGEN_GEN_SRCS) # $(MAKE) $(SRCS) # $(MODCC) -MM $(MODCFLAGS) $(SRCS) $(IGEN_GEN_SRCS) > DEPENDS ## makedepend -fDEPENDS -- $(CFLAGS) $(SRCS) $(IGEN_SRCS) $(NOPED_SRCS) #!else #!ifdef EXPLICIT_DEPENDS #ADEPENDS: #!else #DEPENDS: $(SRCS) #!endif # touch DEPENDS # $(MAKE) $(SRCS) # $(MODCC) -MM $(MODCFLAGS) $(SRCS) > DEPENDS ## makedepend -fDEPENDS -- $(CFLAGS) $(SRCS) #!endif # A few pattern rules for simplicity. The default lex rule is # redefined, just for the sake of cleanliness. More important are the # igen rules; they "automatically" pick the correct type of igen to # run. Actually, we can't do this completely "right" unless igen is # changed to generate different output files for the various type of # interfaces. # {..\src\}.C.obj: $(CXX) $(CXXFLAGS) -c $< .C.obj: $(CXX) $(CXXFLAGS) -c $< {..\src\}.y.C: $(YACC) $(YFLAGS) $< $(RM) $@ $(MV) y.tab.c $@ {..\src\}.y.obj: $(YACC) $(YFLAGS) $< $(RM) $@ $(MV) y.tab.c $@ $(CXX) $(CXXFLAGS) -c $< #%.C: %.y # $(YACC) $(YFLAGS) $< # $(MV) y.tab.c $@ %.C: %.l $(LEX) -t $(LFLAGS) $< > $@ %.xdr.C %.xdr.CLNT.C %.xdr.CLNT.h %.xdr.SRVR.C %.xdr.SRVR.h %.xdr.h: %.I $(IGEN) -xdr $(ICFLAGS) $< %.thread.C %.thread.CLNT.h %.thread.SRVR.h %.thread.h: %.I $(IGEN) -thread $(ICFLAGS) $< # # include the dependencies. # !include DEPENDS