[PATCH] tdb/Makefile.in

Green, Paul Paul.Green at stratus.com
Thu Nov 30 17:50:56 GMT 2006

This is a small set of patches that I propose to apply to the copy of
Makefile.in that resides in the samba4 hierarchy.

The patches add support for separately specifying the CPPFLAGS and
LDFLAGS, and adds support for an executable extension.

I also changed the makefile to remove all of the binary programs that it
builds, instead of just removing the programs that get installed.

I will hold off closing the patch for a day or two to give people time
to comment.


Paul Green, Senior Technical Consultant, Stratus Technologies.
Voice: +1 978-461-7557; FAX: +1 978-461-3610; Mobile: +1 (978) 235-2451;
AIM: PaulGreen

-------------- next part --------------
diff -urpN old/tdb/Makefile.in new/tdb/Makefile.in
--- old/tdb/Makefile.in	Sun Apr 23 06:54:08 2006
+++ new/tdb/Makefile.in	Fri May 12 00:37:49 2006
@@ -2,15 +2,18 @@
 # Makefile for tdb directory
-CFLAGS = -Iinclude @CFLAGS@
 CC = @CC@
 prefix = @prefix@
 exec_prefix = @exec_prefix@
 bindir = @bindir@
 includedir = @includedir@
 libdir = @libdir@
-PROGS = bin/tdbtool bin/tdbtorture
+PROGS = bin/tdbtool$(EXEEXT) bin/tdbtorture$(EXEEXT)
 TDB_OBJ = common/tdb.o common/dump.o common/io.o common/lock.o \
 	common/open.o common/traverse.o common/freelist.o common/error.o \
@@ -30,20 +33,20 @@ install: all
 	cp include/tdb.h $(includedir)
 	cp tdb.pc $(libdir)/pkgconfig
-bin/tdbtest: tools/tdbtest.o $(TDB_OBJ)
-	$(CC) $(CFLAGS) -o bin/tdbtest tools/tdbtest.o $(TDB_OBJ) -lgdbm
+bin/tdbtest$(EXEEXT): tools/tdbtest.o $(TDB_OBJ)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtest tools/tdbtest.o $(TDB_OBJ) -lgdbm
-bin/tdbtool: tools/tdbtool.o $(TDB_OBJ)
-	$(CC) $(CFLAGS) -o bin/tdbtool tools/tdbtool.o $(TDB_OBJ)
+bin/tdbtool$(EXEEXT): tools/tdbtool.o $(TDB_OBJ)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtool tools/tdbtool.o $(TDB_OBJ)
-bin/tdbtorture: tools/tdbtorture.o $(TDB_OBJ)
-	$(CC) $(CFLAGS) -o bin/tdbtorture tools/tdbtorture.o $(TDB_OBJ)
+bin/tdbtorture$(EXEEXT): tools/tdbtorture.o $(TDB_OBJ)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbtorture tools/tdbtorture.o $(TDB_OBJ)
-bin/tdbdump: tools/tdbdump.o $(TDB_OBJ)
-	$(CC) $(CFLAGS) -o bin/tdbdump tools/tdbdump.o $(TDB_OBJ)
+bin/tdbdump$(EXEEXT): tools/tdbdump.o $(TDB_OBJ)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbdump tools/tdbdump.o $(TDB_OBJ)
-bin/tdbbackup: tools/tdbbackup.o $(TDB_OBJ)
-	$(CC) $(CFLAGS) -o bin/tdbbackup tools/tdbbackup.o $(TDB_OBJ)
+bin/tdbbackup$(EXEEXT): tools/tdbbackup.o $(TDB_OBJ)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o bin/tdbbackup tools/tdbbackup.o $(TDB_OBJ)
 	rm -f $(PROGS) common/*.o tools/*.o *~ *.bak */*~ */*.bak *% core test.db test.tdb test.gdbm

More information about the samba-technical mailing list