summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/netapi/examples/Makefile.in33
1 files changed, 19 insertions, 14 deletions
diff --git a/source3/lib/netapi/examples/Makefile.in b/source3/lib/netapi/examples/Makefile.in
index 86e1b1bc2f..6de3e65546 100644
--- a/source3/lib/netapi/examples/Makefile.in
+++ b/source3/lib/netapi/examples/Makefile.in
@@ -3,7 +3,7 @@ GTK_LIBS=`pkg-config gtk+-2.0 --libs`
KRB5LIBS=@KRB5_LIBS@
LDAP_LIBS=@LDAP_LIBS@
-LIBS=@LIBS@ -lnetapi
+LIBS=@LIBS@ -lnetapi -ltdb -ltalloc
DEVELOPER_CFLAGS=@DEVELOPER_CFLAGS@
FLAGS=-I../ -L../../../bin @CFLAGS@ $(GTK_FLAGS)
CC=@CC@
@@ -14,7 +14,12 @@ DYNEXP=@DYNEXP@
COMPILE_CC = $(CC) -I. $(FLAGS) $(PICFLAG) -c $< -o $@
COMPILE = $(COMPILE_CC)
-BINARY_PREREQS = proto_exists bin/.dummy
+PROGS = bin/getdc@EXEEXT@ \
+ bin/netdomjoin@EXEEXT@ \
+ bin/netdomjoin-gui@EXEEXT@ \
+ bin/getjoinableous@EXEEXT@
+
+all: $(PROGS)
MAKEDIR = || exec false; \
if test -d "$$dir"; then :; else \
@@ -24,6 +29,13 @@ MAKEDIR = || exec false; \
mkdir "$$dir" || \
exec false; fi || exec false
+BINARY_PREREQS = bin/.dummy
+
+bin/.dummy:
+ @if (: >> $@ || : > $@) >/dev/null 2>&1; then :; else \
+ dir=bin $(MAKEDIR); fi
+ @: >> $@ || : > $@ # what a fancy emoticon!
+
.c.o:
@if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
@@ -38,30 +50,23 @@ NETDOMJOIN_OBJ = netdomjoin/netdomjoin.o
NETDOMJOIN_GUI_OBJ = netdomjoin-gui/netdomjoin-gui.o
GETJOINABLEOUS_OBJ = getjoinableous/getjoinableous.o
-PROGS = bin/getdc@EXEEXT@ \
- bin/netdomjoin@EXEEXT@ \
- bin/netdomjoin-gui@EXEEXT@ \
- bin/getjoinableous@EXEEXT@
-
-all: $(PROGS)
-
-bin/getdc@EXEEXT@: $(GETDC_OBJ)
+bin/getdc@EXEEXT@: $(BINARY_PREREQS) $(GETDC_OBJ)
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(GETDC_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
-bin/getjoinableous@EXEEXT@: $(GETJOINABLEOUS_OBJ)
+bin/getjoinableous@EXEEXT@: $(BINARY_PREREQS) $(GETJOINABLEOUS_OBJ)
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(GETJOINABLEOUS_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
-bin/netdomjoin@EXEEXT@: $(NETDOMJOIN_OBJ)
+bin/netdomjoin@EXEEXT@: $(BINARY_PREREQS) $(NETDOMJOIN_OBJ)
@echo Linking $@
@$(CC) $(FLAGS) -o $@ $(NETDOMJOIN_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS)
-bin/netdomjoin-gui@EXEEXT@: $(NETDOMJOIN_GUI_OBJ)
+bin/netdomjoin-gui@EXEEXT@: $(BINARY_PREREQS) $(NETDOMJOIN_GUI_OBJ)
@echo Linking $@
@$(CC) $(FLAGS) $(GTK_FLAGS) -o $@ $(NETDOMJOIN_GUI_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(GTK_LIBS)
clean:
-rm -f $(PROGS)
-rm -f core */*~ *~ \
- */*.o */*/*.o */*/*/*.o \
+ */*.o */*/*.o */*/*/*.o