home: hub: 9ficl

Download patch

ref: c34733bf90b04aabfb6b2b814b328a7602ef8b5d
parent: fb53467950a0e56ae1c094b1645d0a6a411dc59f
author: asau <asau@ficl.sf.net>
date: Sat Dec 4 14:51:31 CST 2010

Reuse $@ for target names in commands.

--- a/Makefile
+++ b/Makefile
@@ -39,7 +39,7 @@
 	wd="$$(pwd)"; cd test && $${wd}/ficl ficltest.fr < /dev/null
 
 ficl: main.o $(HEADERS) libficl.a
-	$(CC) $(CFLAGS) $(LDFLAGS) main.o -o ficl -L. -lficl -lm
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ main.o -L. -lficl -lm
 
 lib: libficl.so.$(MAJOR).$(MINOR)
 
@@ -50,12 +50,11 @@
 
 # shared library build
 libficl.so.$(MAJOR).$(MINOR): $(OBJECTS)
-	$(CC) $(LDFLAGS) -shared -Wl,-soname,libficl.so.$(MAJOR).$(MINOR) \
-	-o libficl.so.$(MAJOR).$(MINOR) $(OBJECTS)
+	$(CC) $(LDFLAGS) -shared -Wl,-soname,$@ -o $@ $(OBJECTS)
 	ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so
 
 main: main.o ficl.h sysdep.h libficl.so.$(MAJOR).$(MINOR)
-	$(CC) $(CFLAGS) $(LDFLAGS) main.o -o main -L. -lficl -lm
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ main.o -L. -lficl -lm
 	ln -sf libficl.so.$(MAJOR).$(MINOR) libficl.so.$(MAJOR)
 
 # depend explicitly to help finding source files in another subdirectory,