Initial creation.

This commit is contained in:
agibert 2005-01-24 23:24:30 +00:00
parent 4cfc687710
commit 8b84ce1517
9 changed files with 617 additions and 2 deletions

25
Makefile Normal file
View File

@ -0,0 +1,25 @@
# $RCSfile: Makefile,v $
# $Revision: 1.1 $
# $Name: $
# $Date: 2005/01/24 23:24:30 $
# $Author: agibert $
#------------------------------------------------------------------------------
# Main Makefile
#------------------------------------------------------------------------------
SUBDIRS := include lib util doc
FILE_DOC := *.txt
include Makefile.var
include Makefile.rule
dir_clean:
$(RM) $(PROG_VERSION_NAME).src.*

359
Makefile.rule Normal file
View File

@ -0,0 +1,359 @@
# $RCSfile: Makefile.rule,v $
# $Revision: 1.1 $
# $Name: $
# $Date: 2005/01/24 23:24:30 $
# $Author: agibert $
#------------------------------------------------------------------------------
# Rule Makefile
#------------------------------------------------------------------------------
# ----------------- DEFAULT RULES ---------------------
default:all
# ----------------- IMPLICITES RULES ---------------------
# Here are all the rules allowing to compile sources files
# c -> o
%.o:%.c
$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
# c -> executable
.c :
$(CC) $(CFLAGS) $(INCLUDE) $< -o $@ -I . $(LIB)
# o -> executable
%:%.o
$(CC) $(LFLAGS) -o $@ $? $(LIB)
# .o -> .so
%.so:%.o
$(CC) $(LDSOFLAGS) -shared -o $@ $? $(LIB)
%.a:%.o
$(AR) -r $@ $?
$(OBJECTS) : $(SRC)
# "depend" rule allow to build the dependancy file
depend:
# "all" Rule
all: dir_all
ifneq ($(SUBDIRS),)
for d in $(SUBDIRS) ; do $(MAKE) all -C $$d/ ; done
endif
dir_all: $(TARGETS)
# "clean" Rule
clean: dir_clean
ifneq ($(SUBDIRS),)
for d in $(SUBDIRS) ; do $(MAKE) clean -C $$d/ ; done
endif
dir_clean:
@(command="$(RM) $(TARGETS) $$(echo $(SRC) | sed "s/\.c/\.o/g") ;" ; \
echo $$command ; \
eval $$command ;)
# "pre_install" Rule
# This empty rule can be overiden in module Makefile in order to run pre-install commands.
pre_install:
# "post_install" Rule
# This empty rule can be overiden in module Makefile in order to run post-install commands.
post_install:
# "install" Rule
install: dir_install
ifneq ($(SUBDIRS),)
for d in $(SUBDIRS) ; do $(MAKE) install -C $$d/ ; done
endif
dir_install: dir_all
$(MAKE) pre_install
ifneq ($(FILE_BIN),)
@if test ! -d $(PATH_BIN) ; then $(MKDIR) $(PATH_BIN) ; fi
$(INSTALLBIN) $(FILE_BIN) $(PATH_BIN)
endif
ifneq ($(FILE_BINSUID),)
@if test ! -d $(PATH_BINSUID) ; then $(MKDIR) $(PATH_BINSUID) ; fi
$(INSTALLBINSUID) $(FILE_BINSUID) $(PATH_BINSUID)
endif
ifneq ($(FILE_CGI),)
@if test ! -d $(PATH_CGI) ; then $(MKDIR) $(PATH_CGI) ; fi
$(INSTALLCGI) $(FILE_CGI) $(PATH_CGI)
endif
ifneq ($(FILE_DOC),)
@if test ! -d $(PATH_DOC) ; then $(MKDIR) $(PATH_DOC) ; fi
$(INSTALLDOC) $(FILE_DOC) $(PATH_DOC)
endif
ifneq ($(FILE_ETC),)
@if test ! -d $(PATH_ETC) ; then $(MKDIR) $(PATH_ETC) ; fi
$(INSTALLETC) $(FILE_ETC) $(PATH_ETC)
endif
ifneq ($(FILE_HOME),)
@if test ! -d $(PATH_HOME) ; then $(MKDIR) $(PATH_HOME) ; fi
$(INSTALLHOME) $(FILE_HOME) $(PATH_HOME)
endif
ifneq ($(FILE_HOMEBIN),)
@if test ! -d $(PATH_HOMEBIN) ; then $(MKDIR) $(PATH_HOMEBIN) ; fi
$(INSTALLHOMEBIN) $(FILE_HOMEBIN) $(PATH_HOMEBIN)
endif
ifneq ($(FILE_LIB),)
@if test ! -d $(PATH_LIB) ; then $(MKDIR) $(PATH_LIB) ; fi
$(INSTALLLIB) $(FILE_LIB) $(PATH_LIB)
endif
ifneq ($(FILE_HOMELIB),)
@if test ! -d $(PATH_HOMELIB) ; then $(MKDIR) $(PATH_HOMELIB) ; fi
$(INSTALLHOMELIB) $(FILE_HOMELIB) $(PATH_HOMELIB)
endif
ifneq ($(FILE_INCLUDE),)
@if test ! -d $(PATH_INCLUDE) ; then $(MKDIR) $(PATH_INCLUDE) ; fi
$(INSTALLINCLUDE) $(FILE_INCLUDE) $(PATH_INCLUDE)
endif
ifneq ($(FILE_MAN),)
@for d in $(FILE_MAN) ; do \
if test ! -d $(PATH_MAN)/$(FILE_MAN) ; then \
$(MKDIR) $(PATH_MAN)/$(FILE_MAN) ; \
fi ; \
$(INSTALLMAN) $(FILE_MAN)/* $(PATH_MAN)/$(FILE_MAN) ; \
done
endif
ifneq ($(FILE_WEBCONF),)
@if test ! -d $(PATH_WEBCONF) ; then $(MKDIR) $(PATH_WEBCONF) ; fi
$(INSTALLWEBCONF) $(FILE_WEBCONF) $(PATH_WEBCONF)
endif
ifneq ($(FILE_WEBCONFSSL),)
@if test ! -d $(PATH_WEBCONFSSL) ; then $(MKDIR) $(PATH_WEBCONFSSL) ; fi
$(INSTALLWEBCONFSSL) $(FILE_WEBCONFSSL) $(PATH_WEBCONFSSL)
endif
ifneq ($(FILE_HTML),)
@if test ! -d $(PATH_HTML) ; then $(MKDIR) $(PATH_HTML) ; fi
$(INSTALLHTML) $(FILE_HTML) $(PATH_HTML)
endif
ifneq ($(FILE_WEBICONS),)
@if test ! -d $(PATH_WEBICONS) ; then $(MKDIR) $(PATH_WEBICONS) ; fi
$(INSTALLWEBICONS) $(FILE_WEBICONS) $(PATH_WEBICONS)
endif
$(MAKE) post_install
# "pre_uninstall" Rule
# This empty rule can be overiden in module Makefile in order to run pre-uninstall commands.
pre_uninstall:
# "post_uninstall" Rule
# This empty rule can be overiden in module Makefile in order to run post-uninstall commands.
post_uninstall:
# "uninstall" Rule
uninstall: dir_uninstall
ifneq ($(SUBDIRS),)
for d in $(SUBDIRS) ; do $(MAKE) uninstall -C $$d/ ; done
endif
dir_uninstall:
$(MAKE) pre_uninstall
ifneq ($(FILE_BIN),)
@(if test -d $(PATH_BIN) ; then \
$(CD) $(PATH_BIN) ; \
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
if [ $$? -ne 0 ] ; then \
echo "$(CD) $(PATH_BIN)" ; \
echo "$(RM) $(FILE_BIN)" ; \
fi ; \
$(RM) $(FILE_BIN) ; \
fi)
endif
ifneq ($(FILE_BINSUID),)
@(if test -d $(PATH_BINSUID) ; then \
$(CD) $(PATH_BINSUID) ; \
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
if [ $$? -ne 0 ] ; then \
echo "$(CD) $(PATH_BINSUID)" ; \
echo "$(RM) $(FILE_BINSUID)" ; \
fi ; \
$(RM) $(FILE_BINSUID) ; \
fi)
endif
ifneq ($(FILE_CGI),)
@(if test -d $(PATH_CGI) ; then \
$(CD) $(PATH_CGI) ; \
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
if [ $$? -ne 0 ] ; then \
echo "$(CD) $(PATH_CGI)" ; \
echo "$(RM) $(FILE_CGI)" ; \
fi ; \
$(RM) $(FILE_CGI) ; \
fi)
endif
ifneq ($(FILE_DOC),)
@(if test -d $(PATH_DOC) ; then \
$(CD) $(PATH_DOC) ; \
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
if [ $$? -ne 0 ] ; then \
echo "$(CD) $(PATH_DOC)" ; \
echo "$(RM) $(FILE_DOC)" ; \
fi ; \
$(RM) $(FILE_DOC) ; \
fi)
endif
ifneq ($(FILE_ETC),)
@(if test -d $(PATH_ETC) ; then \
$(CD) $(PATH_ETC) ; \
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
if [ $$? -ne 0 ] ; then \
echo "$(CD) $(PATH_ETC)" ; \
echo "$(RM) $(FILE_ETC)" ; \
fi ; \
$(RM) $(FILE_ETC) ; \
fi)
endif
ifneq ($(FILE_HOME),)
@(if test -d $(PATH_HOME) ; then \
$(CD) $(PATH_HOME) ; \
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
if [ $$? -ne 0 ] ; then \
echo "$(CD) $(PATH_HOME)" ; \
echo "$(RM) $(FILE_HOME)" ; \
fi ; \
$(RM) $(FILE_HOME) ; \
fi)
endif
ifneq ($(FILE_HOMEBIN),)
@(if test -d $(PATH_HOMEBIN) ; then \
$(CD) $(PATH_HOMEBIN) ; \
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
if [ $$? -ne 0 ] ; then \
echo "$(CD) $(PATH_HOMEBIN)" ; \
echo "$(RM) $(FILE_HOMEBIN)" ; \
fi ; \
$(RM) $(FILE_HOMEBIN) ; \
fi)
endif
ifneq ($(FILE_LIB),)
@(if test -d $(PATH_LIB) ; then \
$(CD) $(PATH_LIB) ; \
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
if [ $$? -ne 0 ] ; then \
echo "$(CD) $(PATH_LIB)" ; \
echo "$(RM) $(FILE_LIB)" ; \
fi ; \
$(RM) $(FILE_LIB) ; \
fi)
endif
ifneq ($(FILE_HOMELIB),)
@(if test -d $(PATH_HOMELIB) ; then \
$(CD) $(PATH_HOMELIB) ; \
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
if [ $$? -ne 0 ] ; then \
echo "$(CD) $(PATH_HOMELIB)" ; \
echo "$(RM) $(FILE_HOMELIB)" ; \
fi ; \
$(RM) $(FILE_HOMELIB) ; \
fi)
endif
ifneq ($(FILE_INCLUDE),)
@(if test -d $(PATH_INCLUDE) ; then \
$(CD) $(PATH_INCLUDE) ; \
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
if [ $$? -ne 0 ] ; then \
echo "$(CD) $(PATH_INCLUDE)" ; \
echo "$(RM) $(FILE_INCLUDE)" ; \
fi ; \
$(RM) $(FILE_INCLUDE) ; \
fi)
endif
ifneq ($(FILE_MAN),)
@(if test -d $(PATH_MAN) ; then \
$(CD) $(PATH_MAN) ; \
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
if [ $$? -ne 0 ] ; then \
echo "$(CD) $(PATH_MAN)" ; \
echo "$(RM) $(FILE_MAN)" ; \
fi ; \
$(RM) $(FILE_MAN) ; \
fi)
endif
ifneq ($(FILE_WEBCONF),)
@(if test -d $(PATH_WEBCONF) ; then \
$(CD) $(PATH_WEBCONF) ; \
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
if [ $$? -ne 0 ] ; then \
echo "$(CD) $(PATH_WEBCONF)" ; \
echo "$(RM) $(FILE_WEBCONF)" ; \
fi ; \
$(RM) $(FILE_WEBCONF) ; \
fi)
endif
ifneq ($(FILE_WEBCONFSSL),)
@(if test -d $(PATH_WEBCONFSSL) ; then \
$(CD) $(PATH_WEBCONFSSL) ; \
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
if [ $$? -ne 0 ] ; then \
echo "$(CD) $(PATH_WEBCONFSSL)" ; \
echo "$(RM) $(FILE_WEBCONFSSL)" ; \
fi ; \
$(RM) $(FILE_WEBCONFSSL) ; \
fi)
endif
ifneq ($(FILE_HTML),)
@(if test -d $(PATH_HTML) ; then \
$(CD) $(PATH_HTML) ; \
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
if [ $$? -ne 0 ] ; then \
echo "$(CD) $(PATH_HTML)" ; \
echo "$(RM) $(FILE_HTML)" ; \
fi ; \
$(RM) $(FILE_HTML) ; \
fi)
endif
ifneq ($(FILE_WEBICONS),)
@(if test -d $(PATH_WEBICONS) ; then \
$(CD) $(PATH_WEBICONS) ; \
(echo $(MAKEFLAGS) | grep s) > /dev/null ; \
if [ $$? -ne 0 ] ; then \
echo "$(CD) $(PATH_WEBICONS)" ; \
echo "$(RM) $(FILE_WEBICONS)" ; \
fi ; \
$(RM) $(FILE_WEBICONS) ; \
fi)
endif
$(MAKE) post_uninstall
# "distrib" Rule
distrib:
$(MAKE) clean
$(MKDIR) $(TMP_DIR)/$(PROG_VERSION_NAME)
$(TAR) cf - . | $(TAR) xvpf - -C $(TMP_DIR)/$(PROG_VERSION_NAME)
$(TAR) cvf - -C $(TMP_DIR) --exclude CVS $(PROG_VERSION_NAME) | $(GZIP) -9 >$(PROG_VERSION_NAME).src.tgz
$(TAR) cvf - -C $(TMP_DIR) --exclude CVS $(PROG_VERSION_NAME) | $(BZIP2) -9 >$(PROG_VERSION_NAME).src.tbz2
$(MV) $(TMP_DIR)/$(PROG_VERSION_NAME) .
$(ZIP) -r -m -9 $(PROG_VERSION_NAME).src.zip $(PROG_VERSION_NAME) -x \*/CVS/\*
$(RM) -r $(PROG_VERSION_NAME)

92
Makefile.var Normal file
View File

@ -0,0 +1,92 @@
# $RCSfile: Makefile.var,v $
# $Revision: 1.1 $
# $Name: $
# $Date: 2005/01/24 23:24:30 $
# $Author: agibert $
#------------------------------------------------------------------------------
# Variable Makefile
#------------------------------------------------------------------------------
PROG_NAME=libshmem
PROG_TAG=$Name: $
ifeq ($(words $(PROG_TAG)),2)
PROG_VERSION_NAME=$(subst _,.,$(word 2, $(PROG_TAG)))
else
PROG_VERSION_NAME=$(PROG_NAME)
endif
CC=/usr/bin/gcc
AR=/usr/bin/ar
CD=cd
MKDIR=/bin/mkdir -p
RM=/bin/rm -f
MV=/bin/mv
TAR=tar
GZIP=gzip
BZIP2=bzip2
ZIP=zip
PATH_WEB=$(addprefix /var/httpd/, $(PROG_NAME))
INSTALLBIN=/usr/bin/install -m 755
INSTALLBINSUID=/usr/bin/install -m 4755
INSTALLCGI=/usr/bin/install -m 555
INSTALLDOC=/usr/bin/install -m 444
INSTALLETC=/usr/bin/install -m 600
INSTALLHOME=/usr/bin/install -m 400
INSTALLHOMEBIN=/usr/bin/install -m 750
INSTALLLIB=/usr/bin/install -m 755
INSTALLHOMELIB=/usr/bin/install -m 755
INSTALLINCLUDE=/usr/bin/install -m 644
INSTALLMAN=/usr/bin/install -m 644
INSTALLWEBCONF=/usr/bin/install -m 644
INSTALLWEBCONFSSL=/usr/bin/install -m 644
INSTALLHTML=/usr/bin/install -m 444
INSTALLWEBICONS=/usr/bin/install -m 444
ifeq ($(ROOT),)
HOME_DIR := /
else
HOME_DIR := $(ROOT)
endif
PATH_BIN := $(addprefix $(HOME_DIR),/usr/bin)
PATH_BINSUID := $(PATH_BIN)
PATH_CGI := $(addprefix $(HOME_DIR),$(addprefix $(PATH_WEB),/cgi-bin))
PATH_DOC := $(addprefix $(HOME_DIR),$(addprefix /usr/share/doc/,$(PROG_VERSION_NAME)))
PATH_ETC := $(addprefix $(HOME_DIR),$(addprefix /etc/,$(MODULE)))
PATH_HOME := $(addprefix $(HOME_DIR),$(addprefix $(addprefix /var/lib/, $(PROG_NAME)), $(MODULE)))
PATH_HOMEBIN := $(addprefix $(HOME_DIR), $(addprefix $(addprefix /var/lib/, $(PROG_NAME)), /bin))
PATH_LIB := $(addprefix $(HOME_DIR),/usr/lib)
PATH_HOMELIB := $(addprefix $(HOME_DIR), $(addprefix $(addprefix /var/lib/, $(PROG_NAME)), /lib))
PATH_INCLUDE := $(addprefix $(HOME_DIR),/usr/include)
PATH_MAN := $(addprefix $(HOME_DIR),/usr/share/man)
PATH_WEBCONF := $(addprefix $(HOME_DIR),/etc/httpd/conf/vhosts)
PATH_WEBCONFSSL := $(addprefix $(HOME_DIR),/etc/httpd/conf/ssl)
PATH_HTML := $(addprefix $(HOME_DIR),$(addprefix $(addprefix $(PATH_WEB),/html/),$(MODULE)))
PATH_WEBICONS := $(addprefix $(HOME_DIR),$(addprefix $(PATH_WEB),/icons))
PATH_LOG := $(addprefix $(HOME_DIR),/var/log)
TMP_DIR=/tmp
CFLAGS=
ifeq ($(DEBUG), YES)
CFLAGS += -g -D_DEBUG
endif
ifeq ($(DEBUG), Y)
CFLAGS += -g -D_DEBUG
endif
ifeq ($(OPTIM), YES)
CFLAGS += -O3
endif
ifeq ($(OPTIM), Y)
CFLAGS += -O3
endif

54
demo/Makefile Normal file
View File

@ -0,0 +1,54 @@
SRC := smdemo0.c
TARGETS := smdemo0 smdemo0-c smdemo0-static smdemo0-static-c
FILE_BIN := smdemo0 smdemo0-c smdemo0-static smdemo0-static-c
FILE_LIB := smdemo0.dat
include ../Makefile.var
include ../Makefile.rule
DEP_STATIC += ../lib/libnode.a
DEP_DYNAMIC += ../lib/libnode.so
INCLUDE += -I . -I ../include
LIBDIR += -L . -L ../lib
LIB_STATIC += ../lib/libnode.a -ldl
LIB_DYNAMIC += -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 = -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)

5
doc/Makefile Normal file
View File

@ -0,0 +1,5 @@
FILE_DOC := libshmem.doc
FILE_MAN := man3
include ../Makefile.var
include ../Makefile.rule

6
include/Makefile Normal file
View File

@ -0,0 +1,6 @@
FILE_INCLUDE := shmem.h
include ../Makefile.var
include ../Makefile.rule

View File

@ -1,9 +1,9 @@
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* $RCSfile: shmem.h,v $ */ /* $RCSfile: shmem.h,v $ */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/
/* $Revision: 2.0 $ */ /* $Revision: 2.1 $ */
/* $Name: $ */ /* $Name: $ */
/* $Date: 2005/01/24 22:57:06 $ */ /* $Date: 2005/01/24 23:24:30 $ */
/* $Author: agibert $ */ /* $Author: agibert $ */
/*---------------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------------*/

22
lib/Makefile Normal file
View File

@ -0,0 +1,22 @@
SRC := libshmem.c
TARGETS := libshmem.a libshmem.so
FILE_LIB := libshmem.a libshmem.so
include ../Makefile.var
include ../Makefile.rule
DEP += libshmem.h ../include/shmem.h ../../libnode/include/node.h Makefile
INCLUDE += -I . -I ../include -I ../../libnode/include
ifdef _LIBVER_SUPPORT
DEP += ../../libver/ver.h
INCLUDE += -I ../../libver/lib
endif
libshmem.o : libshmem.c $(DEP)

52
util/Makefile Normal file
View File

@ -0,0 +1,52 @@
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 ../../libnode/lib/libnode.a
DEP_DYNAMIC += ../lib/libshmem.so ../../libnode/lib/libnode.so
INCLUDE += -I . -I ../include -I ../../libnode/include
LIBDIR += -L . -L ../lib -L ../../libnode/lib
LIB_STATIC += ../lib/libshmem.a ../../libnode/lib/libnode.a -ldl
LIB_DYNAMIC += -lshmem -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)