summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Nagy <mnagy@redhat.com>2009-01-09 21:30:31 +0100
committerMartin Nagy <mnagy@redhat.com>2009-01-09 21:30:31 +0100
commit60462d4fc96857475b4693f89d3db703c68b4811 (patch)
tree38908e2df3c9fe16688d0d09df6767a07c5f8b5f
parent775589b664fd810d3617b9a995fdce2cb5e92f52 (diff)
downloadldap_driver-60462d4fc96857475b4693f89d3db703c68b4811.tar.gz
ldap_driver-60462d4fc96857475b4693f89d3db703c68b4811.tar.xz
ldap_driver-60462d4fc96857475b4693f89d3db703c68b4811.zip
Fix up Makefile.
-rw-r--r--Makefile19
1 files changed, 5 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index f2d24ea..ef194c7 100644
--- a/Makefile
+++ b/Makefile
@@ -5,24 +5,15 @@ LIBMINOR = 0
LIBNAME = libdnsldap.so.$(LIBMAJOR).$(LIBMINOR).0
LIBSONAME = libdnsldap.so.$(LIBMAJOR)
-LIBSOURCES = ldap_driver.c semaphore.o log.o str.o
+OBJS = ldap_driver.o semaphore.o log.o str.o
-ALL_CFLAGS = -Wall -Wextra -pedantic -std=c99 -g -fPIC $(CFLAGS)
+CFLAGS := -Wall -Wextra -pedantic -std=c99 -g -fPIC $(CFLAGS)
-all: $(LIBNAME) semaphore.o
+all: $(LIBNAME)
clean:
rm -f $(LIBNAME) *.o
-$(LIBNAME): $(LIBSOURCES)
- $(CC) $(ALL_CFLAGS) -ldns -lldap -shared -Wl,-soname,$(LIBSONAME) $+ -o $@
-
-semaphore.o: semaphore.c
- $(CC) $(ALL_CFLAGS) -c $+ -o $@
-
-log.o: log.c
- $(CC) $(ALL_CFLAGS) -c $+ -o $@
-
-str.o: str.c
- $(CC) $(ALL_CFLAGS) -c $+ -o $@
+$(LIBNAME): $(OBJS)
+ $(CC) -ldns -lldap -shared -Wl,-soname,$(LIBSONAME) $+ -o $@