libshmem/util/Makefile
Arnaud G. GIBERT 7725a1e1d8 - Upgrade licences files,
- Update ReadMe & ReleaseNote files,
- Fix various hearders.
2024-04-18 13:52:43 +02:00

53 lines
1.7 KiB
Makefile

SRC := smadmin.c
TARGETS := smadmin smadmin-c smadmin-static smadmin-static-c
FILE_BIN := smadmin smadmin-c smadmin-static smadmin-static-c
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
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 = -DSM_MODE=0
ND_NOCHECK_FLAGS = -DSM_MODE=1
smadmin: smadmin.c $(DEP_DYNAMIC)
$(CC) -o $@ $(CFLAGS) $(ND_NOCHECK_FLAGS) $(INCLUDE) $(LIBDIR) $(LIB_DYNAMIC) $<
smadmin-c: smadmin.c $(DEP_DYNAMIC)
$(CC) -o $@ $(CFLAGS) $(ND_CHECK_FLAGS) $(INCLUDE) $(LIBDIR) $(LIB_DYNAMIC) $<
smadmin-static: smadmin.c $(DEP_STATIC)
$(CC) -o $@ $(CFLAGS) $(ND_NOCHECK_FLAGS) $(INCLUDE) $< $(LIB_STATIC)
smadmin-static-c: smadmin.c $(DEP_STATIC)
$(CC) -o $@ $(CFLAGS) $(ND_CHECK_FLAGS) $(INCLUDE) $< $(LIB_STATIC)