# # 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. # # $Log: make.program.tmpl,v $ # Revision 1.12 1996/11/14 14:18:34 naim # Minor change to make qpt work for paradynd - naim # # Revision 1.11 1996/08/05 07:08:53 tamches # used BACKUP_CORE to remove a /p/paradyn dependency in VPATH # # Revision 1.10 1996/04/29 03:27:55 tamches # added APP_PURE_OPTIONS for application-specific purify options # # Revision 1.9 1996/01/05 19:52:09 tamches # igen --> $(IGEN) # # Revision 1.8 1995/11/29 00:14:12 tamches # added -cache-dir=/tmp option to purify so we don't run out of disk space # while purify works. Added quantify; added qpt. # # Revision 1.7 1995/08/29 20:18:17 krisna # removed the "tmp" directory references # changed "cp" BACK TO "mv" for yacc output # # Revision 1.6 1995/08/24 15:00:55 hollings # AIX/SP-2 port (including option for split instruction/data heaps) # Tracing of rexec (correctly spawns a paradynd if needed) # Added rtinst function to read getrusage stats (can now be used in metrics) # Critical Path # Improved Error reporting in MDL sematic checks # Fixed MDL Function call statement # Fixed bugs in TK usage (strings passed where UID expected) # # Revision 1.5 1995/03/15 19:12:13 jcargill # Added real pure rule, and fixed LDFLAGS # # Revision 1.4 1995/02/27 17:37:06 jcargill # Added support for suppressing implicit dependency generation # (EXPLICIT_DEPENDS) and removed PD_NO_DEPENDS support # # Revision 1.3 1995/02/16 07:56:46 markc # Added flag to prevent generation of DEPENDS file if PD_NO_DEPENDS is true # to save time during recompiles. # # Revision 1.2 1995/01/30 21:26:15 jcargill # Better use of TO_CORE for modules below top-level (e.g. visiClients) # # Revision 1.1 1995/01/30 18:08:21 jcargill # Major build system reorganization # # OBJS = $(patsubst %.C, %.o, $(filter %.C,$(notdir $(SRCS)))) \ $(patsubst %.c, %.o, $(filter %.c,$(notdir $(SRCS)))) \ $(patsubst %.y, %.o, $(filter %.y,$(notdir $(SRCS)))) \ $(patsubst %.l, %.o, $(filter %.l,$(notdir $(SRCS)))) \ $(patsubst %.s, %.o, $(filter %.s,$(notdir $(SRCS)))) \ $(patsubst %.S, %.o, $(filter %.S,$(notdir $(SRCS)))) \ $(IGEN_GEN_SRCS:%.C=%.o) ifndef UNCOMMON_LINK $(TARGET): $(OBJS) $(LIBS) $(MODCC) -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBDIR) $(LIBS) $(SYSLIBS) 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) -Xlinker -Bstatic -o $(TARGET) $(LDFLAGS) $(OBJS) $(LIBDIR) $(LIBS) $(SYSLIBS) -Xlinker -Bdynamic -ldl -Xlinker -Bstatic -lintl # 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: /unsup/qpt2/bin/qpt2 -s $(TARGET) endif ifndef DEST DEST = $(TO_CORE)/../bin/$(PLATFORM) endif #VPATH += ../src:$(TO_CORE)/../lib/$(PLATFORM):/p/paradyn/lib/$(PLATFORM) VPATH += ../src:$(TO_CORE)/../lib/$(PLATFORM):$(BACKUP_CORE)/../lib/$(PLATFORM) echo: echo $(VPATH) clean: rm -f *.o *.[hC] $(TARGET) install: $(DEST)/$(TARGET) $(DEST)/$(TARGET): $(TARGET) cp $(TARGET) $(DEST) .PHONY : depend depend: rm -f 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 DEPENDS: 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. # %.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