Commit c2c8831b authored by Mike Hibler's avatar Mike Hibler
Browse files

simplify: assume same objdir is not used for both freebsd/linux

parent 9bf64939
......@@ -25,20 +25,10 @@ SDLIBS+= -ltb -lmysqlclient
LIBS=
CP= cp -pf
SYSTEM := $(shell uname -s)
all: $(SDPROGS) client
include ${TESTBED_SRCDIR}/GNUmakerules
ifeq ($(SYSTEM),Linux)
SLOTHD_DIR = linuxclient
endif
ifeq ($(SYSTEM),FreeBSD)
SLOTHD_DIR = fbsdclient
endif
slothd: slothd.o slothd.h version.o
$(CC) $(CFLAGS) $(LDFLAGS) -static -o $@ slothd.o version.o $(LIBS)
......@@ -52,14 +42,11 @@ version.c: slothd.c slothd.h sdcollectd.c sdcollectd.h
echo >$@ "char build_info[] = \"Built `date +%d-%b-%Y` by `id -nu`@`hostname | sed 's/\..*//'`:`pwd`\";"
client: slothd
-mkdir -p $(SLOTHD_DIR)
$(CP) slothd $(SLOTHD_DIR)/slothd
install: $(addprefix $(INSTALL_SBINDIR)/, $(SBIN_SCRIPTS) sdcollectd)
client-install: client
$(INSTALL_PROGRAM) -s $(SLOTHD_DIR)/slothd $(DESTDIR)$(CLIENT_BINDIR)
$(INSTALL_PROGRAM) -s slothd $(DESTDIR)$(CLIENT_BINDIR)
clean:
rm -f *.o $(SDPROGS) *~ core *.core version.c
rm -rf fbsdclient linuxclient
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment