Revise the multicast Makefile to better support parallel make
authorPhil Miller <mille121@illinois.edu>
Wed, 12 Nov 2008 23:46:57 +0000 (23:46 +0000)
committerPhil Miller <mille121@illinois.edu>
Wed, 12 Nov 2008 23:46:57 +0000 (23:46 +0000)
src/libs/ck-libs/multicast/Makefile

index 9005171c6448727e3caeaca84823b9c790ccb6b5..bad7b2f815fcf77627e761267e35cc94105c07c5 100644 (file)
@@ -1,21 +1,26 @@
-CDIR=../../../..
-CHARMC=$(CDIR)/bin/charmc $(OPTS)
+CDIR :=../../../..
+INCDIR:=$(CDIR)/include
+CHARMC:=$(CDIR)/bin/charmc $(OPTS)
 
-LIB = libmoduleCkMulticast.a
-LIBOBJ = ckmulticast.o
+LIB := libmoduleCkMulticast.a
+LIBOBJ := ckmulticast.o
 
-HEADERS = $(CDIR)/include/CkMulticast.decl.h \
-          $(CDIR)/include/ckmulticast.h 
-LIBDEST =  $(CDIR)/lib/$(LIB)
+HEADERS := $(INCDIR)/CkMulticast.decl.h \
+          $(INCDIR)/CkMulticast.def.h \
+          $(INCDIR)/ckmulticast.h
+LIBDEST :=  $(CDIR)/lib/$(LIB)
 
-CIFILES = ckmulticast.ci
+CIFILES := ckmulticast.ci
 
 all: $(LIBDEST) $(HEADERS)
 
-$(HEADERS): CkMulticast.decl.h ckmulticast.h 
-       /bin/cp CkMulticast.decl.h $(CDIR)/include
-       /bin/cp CkMulticast.def.h $(CDIR)/include
-       /bin/cp ckmulticast.h $(CDIR)/include
+$(INCDIR)/%: %
+       cp $< $@
+
+#$(HEADERS): CkMulticast.decl.h ckmulticast.h 
+#      /bin/cp CkMulticast.decl.h $(CDIR)/include
+#      /bin/cp CkMulticast.def.h $(CDIR)/include
+#      /bin/cp ckmulticast.h $(CDIR)/include
 
 $(LIBDEST): $(LIBOBJ)
        $(CHARMC) -o $(LIBDEST) $(LIBOBJ)