aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorgrunfink <grunfink@noreply.codeberg.org>2024-12-13 07:13:08 +0000
committergrunfink <grunfink@noreply.codeberg.org>2024-12-13 07:13:08 +0000
commite94db271d130a348fdff4940fed4a8b0950bac86 (patch)
treefcd0264989556f1c84bed39d4ec872bbc485704d /Makefile
parent7808d7062508c1b4740eea508baf503dffd89a70 (diff)
parent41081dd0d5918c6a82e1e6213de88c285f1b8158 (diff)
Merge pull request 'Makefile: enable static compilation with musl' (#229) from Shamar/snac2:build-with-musl into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/229
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 600419d..05e65f5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-PREFIX=/usr/local
+PREFIX?=/usr/local
PREFIX_MAN=$(PREFIX)/man
CFLAGS?=-g -Wall -Wextra -pedantic
@@ -6,16 +6,16 @@ all: snac
snac: snac.o main.o data.o http.o httpd.o webfinger.o \
activitypub.o html.o utils.o format.o upgrade.o mastoapi.o
- $(CC) $(CFLAGS) -L/usr/local/lib *.o -lcurl -lcrypto $(LDFLAGS) -pthread -o $@
+ $(CC) $(CFLAGS) -L$(PREFIX)/lib *.o -lcurl -lcrypto $(LDFLAGS) -pthread -o $@
.c.o:
- $(CC) $(CFLAGS) $(CPPFLAGS) -I/usr/local/include -c $<
+ $(CC) $(CFLAGS) $(CPPFLAGS) -I$(PREFIX)/include -c $<
clean:
rm -rf *.o *.core snac makefile.depend
dep:
- $(CC) -I/usr/local/include -MM *.c > makefile.depend
+ $(CC) -I$(PREFIX)/include -MM *.c > makefile.depend
install:
mkdir -p -m 755 $(PREFIX)/bin