aboutsummaryrefslogtreecommitdiff
path: root/sysutils/lockfile-progs/files/patch-Makefile
blob: 63685c2a45d284169209e0a89d375cab68d4bd85 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- Makefile.orig	2021-09-03 17:40:30 UTC
+++ Makefile
@@ -1,5 +1,5 @@
 
-LOADLIBES := -llockfile
+LOADLIBES := -L${LOCALBASE}/lib -llockfile
 CFLAGS ?= -g -Wall -Wformat-security -Werror -O2 -fwrapv -fno-strict-aliasing
 
 all: lockfile-create
@@ -24,7 +24,10 @@ all: lockfile-create
 .PHONY: all
 
 lockfile-create: lockfile-progs.o
-	${CC} -o $@ ${LDFLAGS} $^ ${LOADLIBES}
+	${CC} -o $@ ${LDFLAGS} lockfile-progs.o ${LOADLIBES}
+
+lockfile-progs.o:
+	${CC} ${CFLAGS} -c -I${LOCALBASE}/include lockfile-progs.c
 
 # These tests are quite insufficient, but perhaps better than nothing for now.
 check: all