summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 $@