minor change to Makefile for depend file
authorGengbin Zheng <gzheng@illinois.edu>
Wed, 11 Apr 2012 21:07:29 +0000 (17:07 -0400)
committerGengbin Zheng <gzheng@illinois.edu>
Wed, 11 Apr 2012 21:07:29 +0000 (17:07 -0400)
src/libs/ck-libs/nodeHelper/Make.depends [new file with mode: 0644]
src/libs/ck-libs/nodeHelper/Makefile

diff --git a/src/libs/ck-libs/nodeHelper/Make.depends b/src/libs/ck-libs/nodeHelper/Make.depends
new file mode 100644 (file)
index 0000000..174407a
--- /dev/null
@@ -0,0 +1,43 @@
+#generated by make depends
+NodeHelper.o: NodeHelper.C NodeHelper.h ../../../../tmp/charm++.h \
+ ../../../../tmp/charm.h ../../../../tmp/converse.h \
+ ../../../../tmp/conv-config.h ../../../../tmp/conv-autoconfig.h \
+ ../../../../tmp/conv-common.h ../../../../tmp/conv-mach.h \
+ ../../../../tmp/conv-mach-pxshm.h ../../../../tmp/conv-mach-opt.h \
+ ../../../../tmp/conv-mach-smp.h ../../../../tmp/conv-mach-persistent.h \
+ ../../../../tmp/pup_c.h ../../../../tmp/queueing.h \
+ ../../../../tmp/conv-cpm.h ../../../../tmp/conv-cpath.h \
+ ../../../../tmp/conv-qd.h ../../../../tmp/conv-random.h \
+ ../../../../tmp/conv-lists.h ../../../../tmp/conv-trace.h \
+ ../../../../tmp/persistent.h ../../../../tmp/debug-conv.h \
+ ../../../../tmp/pup.h ../../../../tmp/middle.h \
+ ../../../../tmp/middle-conv.h ../../../../tmp/cklists.h \
+ ../../../../tmp/ckbitvector.h ../../../../tmp/ckstream.h \
+ ../../../../tmp/init.h ../../../../tmp/ckhashtable.h \
+ ../../../../tmp/debug-charm.h ../../../../tmp/debug-conv++.h \
+ ../../../../tmp/simd.h ../../../../tmp/CkMarshall.decl.h \
+ ../../../../tmp/charm++.h ../../../../tmp/ckarrayindex.h \
+ ../../../../tmp/cksection.h ../../../../tmp/ckcallback.h \
+ ../../../../tmp/conv-ccs.h ../../../../tmp/sockRoutines.h \
+ ../../../../tmp/ccs-server.h ../../../../tmp/ckobjQ.h \
+ ../../../../tmp/ckreduction.h ../../../../tmp/CkReduction.decl.h \
+ ../../../../tmp/CkArrayReductionMgr.decl.h \
+ ../../../../tmp/ckmemcheckpoint.h ../../../../tmp/CkMemCheckpoint.decl.h \
+ ../../../../tmp/readonly.h ../../../../tmp/ckarray.h \
+ ../../../../tmp/cklocation.h ../../../../tmp/LBDatabase.h \
+ ../../../../tmp/lbdb.h ../../../../tmp/LBDBManager.h \
+ ../../../../tmp/LBObj.h ../../../../tmp/LBOM.h ../../../../tmp/LBComm.h \
+ ../../../../tmp/LBMachineUtil.h ../../../../tmp/lbdb++.h \
+ ../../../../tmp/LBDatabase.decl.h ../../../../tmp/NullLB.decl.h \
+ ../../../../tmp/BaseLB.decl.h ../../../../tmp/CkLocation.decl.h \
+ ../../../../tmp/CkArray.decl.h ../../../../tmp/ckfutures.h \
+ ../../../../tmp/CkFutures.decl.h ../../../../tmp/charisma.h \
+ ../../../../tmp/charisma.decl.h ../../../../tmp/tempo.h \
+ ../../../../tmp/tempo.decl.h ../../../../tmp/waitqd.h \
+ ../../../../tmp/waitqd.decl.h ../../../../tmp/sdag.h \
+ ../../../../tmp/ckcheckpoint.h ../../../../tmp/CkCheckpoint.decl.h \
+ ../../../../tmp/ckevacuation.h ../../../../tmp/ckarrayreductionmgr.h \
+ ../../../../tmp/trace.h ../../../../tmp/trace-bluegene.h \
+ ../../../../tmp/envelope.h NodeHelperAPI.h NodeHelper.decl.h \
+ NodeHelper.def.h
+       $(CHARMC) -I../../../../tmp -o NodeHelper.o NodeHelper.C
index d8a88269c7080f283d93759ba0ec9759216dd42a..bc8b0824d20bd57eb2af4fc3896bf89c8cfb9084 100644 (file)
@@ -1,4 +1,4 @@
-OPTS= -O3 -lpthread
+override OPTS += -lpthread
 CDIR=../../../..
 CHARMC=$(CDIR)/bin/charmc $(OPTS)
 
 CDIR=../../../..
 CHARMC=$(CDIR)/bin/charmc $(OPTS)
 
@@ -6,9 +6,10 @@ MODULE=NodeHelper
 LIB = $(CDIR)/lib/libmodule$(MODULE).a
 LIBOBJ = NodeHelper.o
 
 LIB = $(CDIR)/lib/libmodule$(MODULE).a
 LIBOBJ = NodeHelper.o
 
+CIFILES = NodeHelper.ci
 HEADERS = NodeHelperAPI.h $(MODULE).decl.h $(MODULE).def.h
 
 HEADERS = NodeHelperAPI.h $(MODULE).decl.h $(MODULE).def.h
 
-all: $(LIBDEST)$(LIB)
+all: $(LIB)  headers
 
 $(LIB): $(LIBOBJ)
        $(CHARMC) -o $(LIB) $(LIBOBJ) 
 
 $(LIB): $(LIBOBJ)
        $(CHARMC) -o $(LIB) $(LIBOBJ) 
@@ -16,9 +17,6 @@ $(LIB): $(LIBOBJ)
 headers: $(HEADERS)
        cp $(HEADERS) $(CDIR)/include/
 
 headers: $(HEADERS)
        cp $(HEADERS) $(CDIR)/include/
 
-NodeHelper.o: NodeHelper.C headers
-       $(CHARMC) -c $<
-
 $(MODULE).def.h: $(MODULE).decl.h
 
 $(MODULE).decl.h: NodeHelper.ci
 $(MODULE).def.h: $(MODULE).decl.h
 
 $(MODULE).decl.h: NodeHelper.ci
@@ -26,3 +24,21 @@ $(MODULE).decl.h: NodeHelper.ci
 
 clean:
        rm -f *.o *.decl.h *.def.h $(LIB) headers
 
 clean:
        rm -f *.o *.decl.h *.def.h $(LIB) headers
+
+include Make.depends
+
+DEPENDFILE = Make.depends
+
+depends:  $(CIFILES) NodeHelper.def.h
+       echo "Creating " $(DEPENDFILE) " ...";  \
+       if [ -f $(DEPENDFILE) ]; then \
+           /bin/cp -f $(DEPENDFILE) $(DEPENDFILE).old; \
+        fi; \
+       echo '#generated by make depends' > $(DEPENDFILE); \
+        for i in $(LIBOBJ) ; do \
+             SRCFILE=`basename $$i .o`.C ; \
+              echo "checking dependencies for $$i : $$SRCFILE" ; \
+              g++ -MM -Wno-deprecated -I$(CDIR)/tmp $$SRCFILE >> $(DEPENDFILE); \
+              echo '   $$(CHARMC) -I$(CDIR)/tmp -o '$$i $$SRCFILE >> $(DEPENDFILE) ; \
+        done; 
+