libshmem/demo/Makefile

82 lines
3.0 KiB
Makefile
Raw Permalink Normal View History

SRC := smdemo0.c smdemo0_snd.c smdemo0_rcv.c
TARGETS := smdemo0 smdemo0-c smdemo0-static smdemo0-static-c \
smdemo0_snd smdemo0_snd-c smdemo0_snd-static smdemo0_snd-static-c \
smdemo0_rcv smdemo0_rcv-c smdemo0_rcv-static smdemo0_rcv-static-c
FILE_BIN := smdemo0 smdemo0-c smdemo0-static smdemo0-static-c \
smdemo0_snd smdemo0_snd-c smdemo0_snd-static smdemo0_snd-static-c \
smdemo0_rcv smdemo0_rcv-c smdemo0_rcv-static smdemo0_rcv-static-c
2005-01-25 00:24:30 +01:00
FILE_LIB := smdemo0.dat
include ../Makefile.var
include ../Makefile.rule
DEP_STATIC += ../lib/libshmem.a ../../liblog/lib/liblog.a ../../libnode/lib/libnode.a
DEP_DYNAMIC += ../lib/libshmem.so ../../liblog/lib/liblog.so ../../libnode/lib/libnode.so
INCLUDE += -I . -I ../include -I ../../liblog/include -I ../../libnode/include
LIBDIR += -L . -L ../lib -L ../../liblog/lib -L ../../libnode/lib
LIB_STATIC += ../lib/libshmem.a ../../liblog/lib/liblog.a ../../libnode/lib/libnode.a -ldl
LIB_DYNAMIC += -lshmem -llog -lnode -ldl
2005-01-25 00:24:30 +01:00
CFLAGS += -rdynamic
ifdef _LIBVER_SUPPORT
DEP_STATIC += ../../libver/ver.h ../../libver/libver.a
DEP_DYNAMIC += ../../libver/ver.h ../../libver/libver.so
INCLUDE += -I ../../libver/lib
LIBDIR += -L ../../libver/lib
ifeq ($(OSTYPE),linux-gnu)
LIB_STATIC += ../../libver/lib/libver.a
LIB_DYNAMIC += -lver
else
LIB_STATIC += ../../libver/lib/libver.a
LIB_DYNAMIC += -lver
endif
CFLAGS += -D_LIBVER_SUPPORT
endif
ND_CHECK_FLAGS = -DND_MODE=0
ND_NOCHECK_FLAGS = -DND_MODE=1
smdemo0: smdemo0.c $(DEP_DYNAMIC)
$(CC) -o $@ $(CFLAGS) $(ND_NOCHECK_FLAGS) $(INCLUDE) $(LIBDIR) $(LIB_DYNAMIC) $<
smdemo0-c: smdemo0.c $(DEP_DYNAMIC)
$(CC) -o $@ $(CFLAGS) $(ND_CHECK_FLAGS) $(INCLUDE) $(LIBDIR) $(LIB_DYNAMIC) $<
smdemo0-static: smdemo0.c $(DEP_STATIC)
$(CC) -o $@ $(CFLAGS) $(ND_NOCHECK_FLAGS) $(INCLUDE) $< $(LIB_STATIC)
smdemo0-static-c: smdemo0.c $(DEP_STATIC)
$(CC) -o $@ $(CFLAGS) $(ND_CHECK_FLAGS) $(INCLUDE) $< $(LIB_STATIC)
smdemo0_snd: smdemo0_snd.c $(DEP_DYNAMIC)
$(CC) -o $@ $(CFLAGS) $(ND_NOCHECK_FLAGS) $(INCLUDE) $(LIBDIR) $(LIB_DYNAMIC) $<
smdemo0_snd-c: smdemo0_snd.c $(DEP_DYNAMIC)
$(CC) -o $@ $(CFLAGS) $(ND_CHECK_FLAGS) $(INCLUDE) $(LIBDIR) $(LIB_DYNAMIC) $<
smdemo0_snd-static: smdemo0_snd.c $(DEP_STATIC)
$(CC) -o $@ $(CFLAGS) $(ND_NOCHECK_FLAGS) $(INCLUDE) $< $(LIB_STATIC)
smdemo0_snd-static-c: smdemo0_snd.c $(DEP_STATIC)
$(CC) -o $@ $(CFLAGS) $(ND_CHECK_FLAGS) $(INCLUDE) $< $(LIB_STATIC)
smdemo0_rcv: smdemo0_rcv.c $(DEP_DYNAMIC)
$(CC) -o $@ $(CFLAGS) $(ND_NOCHECK_FLAGS) $(INCLUDE) $(LIBDIR) $(LIB_DYNAMIC) $<
smdemo0_rcv-c: smdemo0_rcv.c $(DEP_DYNAMIC)
$(CC) -o $@ $(CFLAGS) $(ND_CHECK_FLAGS) $(INCLUDE) $(LIBDIR) $(LIB_DYNAMIC) $<
smdemo0_rcv-static: smdemo0_rcv.c $(DEP_STATIC)
$(CC) -o $@ $(CFLAGS) $(ND_NOCHECK_FLAGS) $(INCLUDE) $< $(LIB_STATIC)
smdemo0_rcv-static-c: smdemo0_rcv.c $(DEP_STATIC)
$(CC) -o $@ $(CFLAGS) $(ND_CHECK_FLAGS) $(INCLUDE) $< $(LIB_STATIC)