distclean: clean
rm -f ../../Makefile.conf
+install: install-bin
+
+install-bin:
+ifeq ($(DEBUG), yes)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG)
+else
+ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG)
+endif
+ $(MAKE) -C $(DIR_PLUGINS) install
+
+uninstall: uninstall-bin
+
+uninstall-bin:
+ rm -f $(PREFIX)/usr/bin/$(PROG)
+
ifneq ($(MAKECMDGOALS),distclean)
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),uninstall)
MAKEOPTS="-j1"
CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
+DEBUG="yes"
if [ "$sys" = "Linux" ]
then
echo "OS=$OS" > $CONFFILE
echo "STG_TIME=yes" >> $CONFFILE
+echo "DEBUG=$DEBUG" >> $CONFFILE
echo "DIR_BUILD=$BUILD_DIR" >> $CONFFILE
echo "DIR_LIB=\$(DIR_BUILD)/../../lib" >> $CONFFILE
echo "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs" >> $CONFFILE
install: install-bin
install-bin:
- install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/$(PROG)
+ifeq ($(DEBUG), yes)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/$(PROG)
+else
+ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/$(PROG)
+endif
$(MAKE) -C $(DIR_LIBSRC) install
uninstall: uninstall-bin
if [ -z $1 ]
then
MAKEOPTS="-j1"
+ DEBUG="no"
else
if [ "$1" = "debug" ]
then
DEFS="-DDEBUG"
MAKEOPTS="-j1"
CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
+ DEBUG="yes"
else
MAKEOPTS="-j1"
+ DEBUG="no"
fi
fi
echo "OS=$OS" > $CONFFILE
echo "STG_TIME=yes" >> $CONFFILE
+echo "DEBUG=$DEBUG" >> $CONFFILE
echo "DIR_BUILD=$BUILD_DIR" >> $CONFFILE
echo "DIR_LIB=\$(DIR_BUILD)/../../lib" >> $CONFFILE
echo "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs" >> $CONFFILE
install: install-bin install-data
install-bin:
- install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+ifeq ($(DEBUG), yes)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+else
+ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+endif
$(MAKE) -C $(DIR_LIBSRC) install
install-data:
if [ -z $1 ]
then
MAKEOPTS="-j1"
+ DEBUG="no"
else
if [ "$1" = "debug" ]
then
DEFS="-DDEBUG"
MAKEOPTS="-j1"
CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
+ DEBUG="yes"
else
MAKEOPTS="-j1"
+ DEBUG="no"
fi
fi
echo "OS=$OS" > $CONFFILE
echo "STG_TIME=yes" >> $CONFFILE
+echo "DEBUG=$DEBUG" >> $CONFFILE
echo "DIR_BUILD=$BUILD_DIR" >> $CONFFILE
echo "DIR_LIB=\$(DIR_BUILD)/../../lib" >> $CONFFILE
echo "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs" >> $CONFFILE
install: install-bin install-data
install-bin:
- install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+ifeq ($(DEBUG), yes)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+else
+ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+endif
$(MAKE) -C $(DIR_LIBSRC) install
install-data:
if [ -z $1 ]
then
MAKEOPTS="-j1"
+ DEBUG="no"
else
if [ "$1" = "debug" ]
then
DEFS="-DDEBUG"
MAKEOPTS="-j1"
CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
+ DEBUG="yes"
else
MAKEOPTS="-j1"
+ DEBUG="no"
fi
fi
echo "OS=$OS" > $CONFFILE
echo "STG_TIME=yes" >> $CONFFILE
+echo "DEBUG=$DEBUG" >> $CONFFILE
echo "DIR_BUILD=$BUILD_DIR" >> $CONFFILE
echo "DIR_LIB=\$(DIR_BUILD)/../../lib" >> $CONFFILE
echo "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs" >> $CONFFILE
install: install-bin
install-bin:
- install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+ifeq ($(DEBUG), yes)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG)
+else
+ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG)
+endif
$(MAKE) -C $(DIR_LIBSRC) install
uninstall: uninstall-bin
if [ -z $1 ]
then
MAKEOPTS="-j1"
+ DEBUG="no"
else
if [ "$1" = "debug" ]
then
DEFS="-DDEBUG"
MAKEOPTS="-j1"
CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
+ DEBUG="yes"
else
MAKEOPTS="-j1"
+ DEBUG="no"
fi
fi
echo "OS=$OS" > $CONFFILE
echo "STG_TIME=yes" >> $CONFFILE
+echo "DEBUG=$DEBUG" >> $CONFFILE
echo "DIR_BUILD=$BUILD_DIR" >> $CONFFILE
echo "DIR_LIB=\$(DIR_BUILD)/../../lib" >> $CONFFILE
echo "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs" >> $CONFFILE
install: install-bin install-data
install-bin:
- install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+ifeq ($(DEBUG), yes)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/bin/$(PROG)
+endif
+ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/bin/$(PROG)
+else
$(MAKE) -C $(DIR_LIBSRC) install
uninstall: uninstall-bin uninstall-data
if [ -z $1 ]
then
MAKEOPTS="-j1"
+ DEBUG="no"
else
if [ "$1" = "debug" ]
then
DEFS="-DDEBUG"
MAKEOPTS="-j1"
CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
+ DEBUG="yes"
else
MAKEOPTS="-j1"
+ DEBUG="no"
fi
fi
echo "OS=$OS" > $CONFFILE
echo "STG_TIME=yes" >> $CONFFILE
+echo "DEBUG=$DEBUG" >> $CONFFILE
echo "DIR_BUILD=$BUILD_DIR" >> $CONFFILE
echo "DIR_LIB=\$(DIR_BUILD)/../../lib" >> $CONFFILE
echo "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs" >> $CONFFILE
install: install-bin install-data
install-bin: $(PROG)
- install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+ifeq ($(DEBUG), yes)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+else
+ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
+endif
$(MAKE) -C $(DIR_INCLUDE) install
$(MAKE) -C $(DIR_LIBSRC) install
$(MAKE) -C $(DIR_PLUGINS) install
then
DEFS="$DEFS -DNDEBUG"
MAKEOPTS="-j1"
+ DEBUG="no"
else
if [ "$1" = "debug" ]
then
DEFS="$DEFS -DDEBUG"
MAKEOPTS="-j1"
CXXFLAGS="$CXXFLAGS -ggdb3 -W -Wall"
+ DEBUG="yes"
else
DEFS="$DEFS -DNDEBUG"
MAKEOPTS="-j1"
+ DEBUG="no"
fi
fi
echo "OS=$OS" > $CONFFILE
echo "STG_TIME=yes" >> $CONFFILE
+echo "DEBUG=$DEBUG" >> $CONFFILE
echo "DIR_BUILD=$BUILD_DIR" >> $CONFFILE
echo "DIR_LIB=\$(DIR_BUILD)/../../lib" >> $CONFFILE
echo "DIR_LIBSRC=\$(DIR_BUILD)/../../stglibs" >> $CONFFILE
install: $(PROG)
mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/stg
- install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
+ifeq ($(DEBUG), yes)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
+else
+ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
+endif
uninstall:
rm -f $(PREFIX)/usr/lib/stg/$(PROG)
rm -f deps $(PROG) *.o *.a *.so tags *.*~
install: $(PROG)
- mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/stg
- install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
+ifeq ($(DEBUG), yes)
+ install -D -m $(BIN_MODE) -o $(OWNER) $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
+else
+ install -D -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
+endif
mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/include/stg
install -m $(DATA_MODE) -o $(OWNER) $(addprefix include/stg/,$(INCS)) $(PREFIX)/usr/include/stg/