changeset 22566:206456738325

Simplify rules using make shorthands.
author diego
date Wed, 14 Mar 2007 22:38:42 +0000
parents 46324dbdfc18
children d68e5e8609a7
files libdha/Makefile
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libdha/Makefile	Wed Mar 14 22:20:40 2007 +0000
+++ b/libdha/Makefile	Wed Mar 14 22:38:42 2007 +0000
@@ -53,12 +53,12 @@
 
 $(LIBNAME):     $(OBJS)
 ifeq ($(TARGET_WIN32),yes)
-	$(AR) r $(LIBNAME) $(OBJS)
+	$(AR) r $@ $^
 else
-	#$(CC) -shared $(SONAME_FLAGS) -o $(LIBNAME) $(OBJS) $(LIBS)
-	$(CC) -shared -Wl,-soname -Wl,$(LIBNAME) -o $(LIBNAME) $(OBJS) $(LIBS)
-	ln -sf $(LIBNAME) $(SHORTNAME)
-	ln -sf $(LIBNAME) $(VSHORTNAME)
+	#$(CC) -shared $(SONAME_FLAGS) -o $@ $^ $(LIBS)
+	$(CC) -shared -Wl,-soname -Wl,$@ -o $@ $^ $(LIBS)
+	ln -sf $@ $(SHORTNAME)
+	ln -sf $@ $(VSHORTNAME)
 endif
 
 all:    $(LIBNAME) $(SHORTNAME)
@@ -66,8 +66,8 @@
 pci_names.c:	oth/pci.db
 	LC_ALL=C $(AWK) -f pci_db2c.awk $<
 
-test:
-	$(CC) test.c -o test $(SHORTNAME)
+test: $(SHORTNAME)
+	$(CC) test.c -o $@ $^
 
 clean:
 	rm -f *.o *.a *~ *.so *.so.*