]> granicus.if.org Git - postgresql/commitdiff
entab: Improve makefile
authorPeter Eisentraut <peter_e@gmx.net>
Tue, 24 Apr 2012 18:20:55 +0000 (21:20 +0300)
committerPeter Eisentraut <peter_e@gmx.net>
Tue, 24 Apr 2012 18:20:55 +0000 (21:20 +0300)
A few simplifications and stylistic improvements, found while grepping
around for makefile problems elsewhere.

src/tools/entab/Makefile

index 6372971fc04bdf0fe9269841b5361ea706b5be16..00be1f5ee732bd101394e84648dafc8e6502ac3b 100644 (file)
@@ -5,17 +5,11 @@
 TARGET = entab
 BINDIR = /usr/local/bin
 XFLAGS =
-CFLAGS = -O
+CFLAGS = -O $(XFLAGS)
 LIBS =
 
-$(TARGET) : entab.o halt.o
-       $(CC) -o $(TARGET) $(XFLAGS) $(CFLAGS) entab.o halt.o $(LIBS)
-
-entab.o        : entab.c
-       $(CC) -c $(XFLAGS) $(CFLAGS) entab.c
-
-halt.o : halt.c
-       $(CC) -c $(XFLAGS) $(CFLAGS) halt.c
+$(TARGET): entab.o halt.o
+       $(CC) -o $@ $(CFLAGS) $^ $(LIBS)
 
 clean:
        rm -f *.o $(TARGET) log core