summaryrefslogtreecommitdiff
path: root/net/tinyldap/files/patch-Makefile
blob: dfee68d63f2333c0a3690ee575633b20b38f5f48 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--- Makefile.orig	2008-04-25 13:09:33.000000000 +0200
+++ Makefile	2009-11-22 22:24:42.000000000 +0100
@@ -35,22 +35,26 @@
 
 auth.a: auth.o
 
-DIET=/opt/diet/bin/diet -Os
-CC=gcc
+DIET=
+CC?=gcc
 CFLAGS=-pipe -I. -Wall -W -Wextra
 ifneq ($(DEBUG),)
-DIET=/opt/diet/bin/diet
-CFLAGS=-pipe -I. -Wall -W -g -fstack-protector
+DIET=
+CFLAGS?=-pipe -I. -Wall -W -g -fstack-protector
 endif
 ifeq ($(COVERAGE),1)
 DIET=
-CFLAGS=-pipe -I. -g -fprofile-arcs -ftest-coverage
+CFLAGS?=-pipe -I. -g -fprofile-arcs -ftest-coverage
 endif
 
+CFLAGS+=-I. -I${LOCALBASE}/include/libowfat -Os
+LDFLAGS+=-L${LOCALBASE}/lib
+LIBS+=-lmd
+
 ifneq ($(DIET),)
 LIBS+=-llatin1
 else
-LIBS+=-lcrypto -lcrypt
+LIBS+=-lcrypt
 endif
 
 %.o: %.c
@@ -79,7 +83,7 @@
 	$(DIET) $(CC) $(CFLAGS) -DSTANDALONE -DDEBUG -o $@ $^ $(LDFLAGS) -lowfat $(LIBS)
 
 acl: acl.c ldap.a asn1.a
-	$(DIET) $(CC) $(CFLAGS) -o acl acl.c -I. ldap.a asn1.a -lowfat $(LIBS)
+	$(DIET) $(CC) $(CFLAGS) -o acl acl.c -I. ldap.a asn1.a $(LDFLAGS) -lowfat $(LIBS)
 
 
 .PHONY: clean tar