aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.in
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2010-08-03 21:28:38 -0500
committerseebs <seebs@seebs-eee.(none)>2010-08-04 17:13:19 -0500
commita0cd008eaf980b8150f6f547935471d243609230 (patch)
tree50b3acfc21d6bf2e8aabf180520f870513c8d759 /Makefile.in
parent8cd34c2ca635b2cd3cacb81e4281f1284f6a243d (diff)
downloadpseudo-a0cd008eaf980b8150f6f547935471d243609230.tar.gz
pseudo-a0cd008eaf980b8150f6f547935471d243609230.tar.bz2
pseudo-a0cd008eaf980b8150f6f547935471d243609230.zip
Fix the Makefile
When generating binaries for the bin directory, they were not properly configured to generate the bin dir. Also sync up and generate the lib dir and localstatedir as well... Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in43
1 files changed, 24 insertions, 19 deletions
diff --git a/Makefile.in b/Makefile.in
index d152cda..a75541e 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -25,9 +25,12 @@ BITS=@BITS@
MARK64=@MARK64@
VERSION=0.3
-LIBDIR=$(PREFIX)/lib$(MARK64)
-BINDIR=$(PREFIX)/bin
-DATADIR=$(PREFIX)/var/pseudo
+LIB=lib$(MARK64)
+BIN=bin
+LOCALSTATE=var/pseudo
+LIBDIR=$(PREFIX)/$(LIB)
+BINDIR=$(PREFIX)/$(BIN)
+LOCALSTATEDIR=$(PREFIX)/$(LOCALSTATE)
CFLAGS_BASE=-pipe -std=gnu99 -Wall -W -Wextra
CFLAGS_CODE=-fPIC -D_LARGEFILE64_SOURCE -D_ATFILE_SOURCE -m$(BITS)
@@ -47,49 +50,50 @@ SHOBJS=pseudo_table.o pseudo_util.o
DBOBJS=pseudo_db.o -ldl -lpthread
WRAPOBJS=pseudo_wrappers.o
-PSEUDO=bin/pseudo
-PSEUDODB=bin/pseudodb
-PSEUDOLOG=bin/pseudolog
+PSEUDO=$(BIN)/pseudo
+PSEUDODB=$(BIN)/pseudodb
+PSEUDOLOG=$(BIN)/pseudolog
+LIBPSEUDO=$(LIB)/libpseudo$(SUFFIX).so
-all: libpseudo.so $(PSEUDO) $(PSEUDODB) $(PSEUDOLOG)
+all: $(LIBPSEUDO) $(PSEUDO) $(PSEUDODB) $(PSEUDOLOG)
-test: all
+test: all $(BIN) $(LIB) $(LOCALSTATE)
@./run_tests.sh
-install-lib: libpseudo.so
+install-lib: $(LIBPSEUDO)
mkdir -p $(DESTDIR)$(LIBDIR)
- cp libpseudo*.so $(DESTDIR)$(LIBDIR)
+ cp $(LIBPSEUDO) $(DESTDIR)$(LIBDIR)
install-bin: $(PSEUDO) $(PSEUDODB) $(PSEUDOLOG)
mkdir -p $(DESTDIR)$(BINDIR)
cp $(PSEUDO) $(PSEUDODB) $(PSEUDOLOG) $(DESTDIR)$(BINDIR)
install-data:
- mkdir -p $(DESTDIR)$(DATADIR)
+ mkdir -p $(DESTDIR)$(LOCALSTATEDIR)
install: all install-lib install-bin install-data
-$(PSEUDO): pseudo.o $(SHOBJS) $(DBOBJS) pseudo_client.o pseudo_server.o pseudo_ipc.o
+$(BIN) $(LIB) $(LOCALSTATE):
+ mkdir -p $@
+
+$(PSEUDO): $(BIN) pseudo.o $(SHOBJS) $(DBOBJS) pseudo_client.o pseudo_server.o pseudo_ipc.o
$(CC) $(CFLAGS) -o $(PSEUDO) \
pseudo.o pseudo_server.o pseudo_client.o pseudo_ipc.o \
$(DBOBJS) $(SHOBJS) $(DBLDFLAGS)
-$(PSEUDOLOG): pseudolog.o $(SHOBJS) $(DBOBJS) pseudo_client.o pseudo_ipc.o
+$(PSEUDOLOG): $(BIN) pseudolog.o $(SHOBJS) $(DBOBJS) pseudo_client.o pseudo_ipc.o
$(CC) $(CFLAGS) -o $(PSEUDOLOG) pseudolog.o pseudo_client.o pseudo_ipc.o \
$(DBOBJS) $(SHOBJS) $(DBLDFLAGS)
-$(PSEUDODB): pseudodb.o $(SHOBJS) $(DBOBJS) pseudo_ipc.o
+$(PSEUDODB): $(BIN) pseudodb.o $(SHOBJS) $(DBOBJS) pseudo_ipc.o
$(CC) $(CFLAGS) -o $(PSEUDODB) pseudodb.o \
$(DBOBJS) $(SHOBJS) $(DBLDFLAGS) pseudo_ipc.o
-libpseudo.so: $(WRAPOBJS) pseudo_client.o pseudo_ipc.o $(SHOBJS)
- $(CC) $(CFLAGS) -shared -o libpseudo.so \
+$(LIBPSEUDO): $(LIB) $(WRAPOBJS) pseudo_client.o pseudo_ipc.o $(SHOBJS)
+ $(CC) $(CFLAGS) -shared -o $(LIBPSEUDO) \
pseudo_client.o pseudo_ipc.o \
$(WRAPOBJS) $(SHOBJS) -ldl
- if test -n "$(SUFFIX)"; then \
- cp libpseudo.so libpseudo$(SUFFIX).so ; \
- fi
pseudo_client.o pseudo_server.o pseudo_ipc.o: pseudo_ipc.h
@@ -123,6 +127,7 @@ clean:
distclean: clean
rm -f Makefile
+ rm -rf ./$(BIN) ./$(LIB) ./$(LOCALSTATE)
@echo "WARNING: Makefile has been removed. You must reconfigure to do anything else."
nuke: distclean