summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2016-11-11 18:36:34 +0100
committerAlexander Sulfrian <alexander@sulfrian.net>2016-11-11 18:36:34 +0100
commite901dc70ccd3913cc01591bf51aa58b07739522c (patch)
treeb4d7c85f69d7684d630aa403dd7cf4d1596a5b3a
parent88efff5ae386040768925943ae8d0824e6e15f6e (diff)
downloadldap-plugin-e901dc70ccd3913cc01591bf51aa58b07739522c.tar.gz
ldap-plugin-e901dc70ccd3913cc01591bf51aa58b07739522c.tar.bz2
ldap-plugin-e901dc70ccd3913cc01591bf51aa58b07739522c.zip
Fix Makefile
-rw-r--r--Makefile12
1 files changed, 7 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 1dccd71..81cc5a3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,7 @@
OPENLDAP_SOURCE := ../source/openldap-2.4.40+dfsg
-TARGET = service_passwords
-INCLUDE_FLAGS = -I$(OPENLDAP_SOURCE)/include
-CFLAGS = $(INCLUDE_FLAGS) -D_REENTRANT -fPIC -Wall -Wextra
-LDFLAGS = -G
+TARGET := service_passwords
+CFLAGS := -I$(OPENLDAP_SOURCE)/include -D_REENTRANT -fPIC -Wall -Wextra $(CFLAGS)
all: $(TARGET).so
@@ -12,10 +10,14 @@ clean:
$(RM) -r html/ latex/
%.so: %.o
- $(LD) $(LDFLAGS) -o $@ $^
+ gcc $(LDFLAGS) -shared -Wl,-soname,$(TARGET) -llber -o $@ $^
%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $^
doc:
doxygen Doxyfile
+
+install: $(TARGET).so
+ install -d $(DESTDIR)/usr/lib/ldap/
+ install -m=0644 $(TARGET).so $(DESTDIR)/usr/lib/ldap/