Revise Makefile to accurately reflect dependencies and creating commands,
authorPhil Miller <mille121@illinois.edu>
Wed, 24 Sep 2008 19:58:31 +0000 (19:58 +0000)
committerPhil Miller <mille121@illinois.edu>
Wed, 24 Sep 2008 19:58:31 +0000 (19:58 +0000)
to enable correct builds and let the run in parallel.

src/libs/ck-libs/sparseContiguousReducer/Makefile

index 14b88a82536dbfbeca09d933c55ec48feb3bb473..8557e0d4261c8f226698f325465bcd76d2dcb3e2 100644 (file)
@@ -5,15 +5,15 @@ LIB = libmoduleCkSparseContiguousReducer.a
 LIBOBJ = cksparsecontiguousreducer.o
 
 HEADERS = $(CDIR)/include/CkSparseContiguousReducer.decl.h \
+          $(CDIR)/include/CkSparseContiguousReducer.def.h \
           $(CDIR)/include/cksparsecontiguousreducer.h
+
 LIBDEST =  $(CDIR)/lib/$(LIB)
 
 all: $(LIBDEST) $(HEADERS)
 
-$(HEADERS): CkSparseContiguousReducer.decl.h cksparsecontiguousreducer.h
-       /bin/cp CkSparseContiguousReducer.decl.h $(CDIR)/include
-       /bin/cp CkSparseContiguousReducer.def.h $(CDIR)/include
-       /bin/cp cksparsecontiguousreducer.h $(CDIR)/include
+$(CDIR)/include/%.h: %.h
+       /bin/cp $< $@
 
 $(LIBDEST) : $(LIB)
        /bin/cp $(LIB) $(LIBDEST)
@@ -24,8 +24,14 @@ $(LIB): $(LIBOBJ)
 cksparsecontiguousreducer.o: cksparsecontiguousreducer.C cksparsecontiguousreducer.h CkSparseContiguousReducer.decl.h CkSparseContiguousReducer.def.h
        $(CHARMC) -c cksparsecontiguousreducer.C
 
-CkSparseContiguousReducer.decl.h CkSparseContiguousReducer.def.h: cksparsecontiguousreducer.ci
+CkSparseContiguousReducer.decl.h CkSparseContiguousReducer.def.h: INTERFACE
+
+INTERFACE: cksparsecontiguousreducer.ci
        $(CHARMC) -c cksparsecontiguousreducer.ci
+       touch $@
 
 clean:
-       rm -f conv-host *.o *.decl.h *.def.h core  $(LIB)
+       rm -f conv-host *.o *.decl.h *.def.h core  $(LIB) INTERFACE
+
+realclean: clean
+       rm -f $(LIBDEST) $(HEADERS)