summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '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/