summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Anna “CyberTailor”2022-12-09 21:07:50 +0500
committerGravatar Anna “CyberTailor”2022-12-09 21:07:50 +0500
commit9858d27818e870b908cea1c82050773c4fc538c5 (patch)
treefb2306206f7fe521ce48514782ab45d057445e32 /Makefile
parentVersion 2.14 RELEASED. (diff)
downloadpenes-snac2-9858d27818e870b908cea1c82050773c4fc538c5.tar.gz
penes-snac2-9858d27818e870b908cea1c82050773c4fc538c5.tar.xz
penes-snac2-9858d27818e870b908cea1c82050773c4fc538c5.zip
Makefile improvements
* Don't overwrite CFLAGS from env * Respect CPPFLAGS and LDFLAGS * Create bindir in "install"
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index e0f2f36..6fb3aa6 100644
--- a/Makefile
+++ b/Makefile
@@ -1,15 +1,15 @@
1PREFIX=/usr/local 1PREFIX=/usr/local
2PREFIX_MAN=$(PREFIX)/man 2PREFIX_MAN=$(PREFIX)/man
3CFLAGS=-g -Wall 3CFLAGS?=-g -Wall
4 4
5all: snac 5all: snac
6 6
7snac: snac.o main.o data.o http.o httpd.o webfinger.o \ 7snac: snac.o main.o data.o http.o httpd.o webfinger.o \
8 activitypub.o html.o utils.o format.o upgrade.o 8 activitypub.o html.o utils.o format.o upgrade.o
9 $(CC) $(CFLAGS) -L/usr/local/lib *.o -lcurl -lcrypto -pthread -o $@ 9 $(CC) $(CFLAGS) -L/usr/local/lib *.o -lcurl -lcrypto -pthread $(LDFLAGS) -o $@
10 10
11.c.o: 11.c.o:
12 $(CC) $(CFLAGS) -I/usr/local/include -c $< 12 $(CC) $(CFLAGS) $(CPPFLAGS) -I/usr/local/include -c $<
13 13
14clean: 14clean:
15 rm -rf *.o *.core snac makefile.depend 15 rm -rf *.o *.core snac makefile.depend
@@ -18,6 +18,7 @@ dep:
18 $(CC) -I/usr/local/include -MM *.c > makefile.depend 18 $(CC) -I/usr/local/include -MM *.c > makefile.depend
19 19
20install: 20install:
21 mkdir -p -m 755 $(PREFIX)/bin
21 install -m 755 snac $(PREFIX)/bin/snac 22 install -m 755 snac $(PREFIX)/bin/snac
22 mkdir -p -m 755 $(PREFIX_MAN)/man1 23 mkdir -p -m 755 $(PREFIX_MAN)/man1
23 install -m 644 doc/snac.1 $(PREFIX_MAN)/man1/snac.1 24 install -m 644 doc/snac.1 $(PREFIX_MAN)/man1/snac.1