added typed reduction example program
[charm.git] / examples / charm++ / typed_reduction / Makefile
1 CHARMC = ../../../bin/charmc
2 BINARY = typed_reduction
3
4 CHARMCFLAGS =
5 CHARMCLINKFLAGS = -language charm++
6 TESTFLAGS = 
7
8 %.o: %.cc
9
10 all: $(BINARY)
11 $(BINARY): $(patsubst %.cc,%.o,$(wildcard *.cc))
12         $(CHARMC) $(CHARMCLINKFLAGS) -o $@ $+
13
14 .SECONDARY: $(patsubst %.cc,%.decl.h,$(wildcard *.cc))
15 .SECONDARY: $(patsubst %.cc,%.def.h,$(wildcard *.cc))
16
17 %.o: %.cc %.decl.h %.def.h
18         $(CHARMC) $(CHARMCFLAGS) $<
19
20 %.decl.h %.def.h: %.ci
21         $(CHARMC) $(CHARMCFLAGS) $<
22
23 test: $(BINARY)
24         ./charmrun ./$(BINARY) $(TESTFLAGS)
25
26 clean:
27         rm -f *.o *.decl.h *.def.h charmrun $(BINARY)