Avoid building user-driven-interop example on non-LRTS layers
[charm.git] / examples / charm++ / user-driven-interop / Makefile
blob09d167539d65528fa8d98583cbd334fd593b9955
1 -include ../../common.mk
2 -include ../../../include/conv-mach-opt.mak
3 CHARMC=../../../bin/charmc $(OPTS)
5 ifeq ($(CMK_USE_LRTS), 1)
6 TARGETS := hello_user hello_user_with_main
7 else
8 TARGETS :=
9 endif
11 all: $(TARGETS)
13 hello_user.decl.h: hello_user.ci
14 $(CHARMC) $<
16 hello_user.o: hello_user.cpp hello_user.decl.h
17 $(CHARMC) -c $< -o $@
19 hello_user: hello_user.o
20 $(CHARMC) -c $^ -o $@
22 hello_user_with_main.decl.h: hello_user.ci
23 $(CHARMC) -DHELLO_USE_MAINCHARE $<
25 hello_user_with_main.o: hello_user.cpp hello_user_with_main.decl.h
26 $(CHARMC) -DHELLO_USE_MAINCHARE -c $< -o $@
28 hello_user_with_main: hello_user_with_main.o
29 $(CHARMC) -DHELLO_USE_MAINCHARE -c $^ -o $@
31 clean:
32 rm -f hello_user hello_user_with_main *.o charmrun *.decl.h *.def.h
34 test: all
35 ifeq ($(CMK_USE_LRTS), 1)
36 $(call run, +p2 ./hello_user 8 )
37 $(call run, +p2 ./hello_user_with_main 8 )
38 ifeq ($(CMK_SMP), 1)
39 ifneq ($(CMK_MULTICORE), 1)
40 $(call run, +p4 ./hello_user 8 ++ppn 2 )
41 $(call run, +p4 ./hello_user_with_main 8 ++ppn 2 )
42 endif
43 endif
44 endif