diff options
| author | 2024-01-07 17:17:02 +0000 | |
|---|---|---|
| committer | 2024-01-07 17:17:02 +0000 | |
| commit | 0414dfae20f1b538e250842136f0923beaa10275 (patch) | |
| tree | a0a91fdc8e9932953cc1cd059e76a21a45f4ca2d /Makefile.NetBSD | |
| parent | Updated RELEASE_NOTES. (diff) | |
| download | snac2-0414dfae20f1b538e250842136f0923beaa10275.tar.gz snac2-0414dfae20f1b538e250842136f0923beaa10275.tar.xz snac2-0414dfae20f1b538e250842136f0923beaa10275.zip | |
Added Makefile.NetBSD to compile on NetBSD
To compile on NetBSD, just use "make -f Makefile.NetBSD" and "make -f Makefile.NetBSD install"
Diffstat (limited to '')
| -rw-r--r-- | Makefile.NetBSD | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Makefile.NetBSD b/Makefile.NetBSD new file mode 100644 index 0000000..2d1194d --- /dev/null +++ b/Makefile.NetBSD | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | PREFIX=/usr/pkg | ||
| 2 | PREFIX_MAN=$(PREFIX)/man | ||
| 3 | CFLAGS?=-g -Wall -Wextra | ||
| 4 | |||
| 5 | all: snac | ||
| 6 | |||
| 7 | snac: snac.o main.o data.o http.o httpd.o webfinger.o \ | ||
| 8 | activitypub.o html.o utils.o format.o upgrade.o mastoapi.o | ||
| 9 | $(CC) $(CFLAGS) -L/usr/pkg/lib *.o -lcurl -lcrypto -pthread $(LDFLAGS) -Wl,-rpath,/usr/lib -Wl,-rpath,/usr/pkg/lib -o $@ | ||
| 10 | |||
| 11 | |||
| 12 | .c.o: | ||
| 13 | $(CC) $(CFLAGS) $(CPPFLAGS) -I/usr/pkg/include -c $< | ||
| 14 | |||
| 15 | clean: | ||
| 16 | rm -rf *.o *.core snac makefile.depend | ||
| 17 | |||
| 18 | dep: | ||
| 19 | $(CC) -I/usr/pkg/include -MM *.c > makefile.depend | ||
| 20 | |||
| 21 | install: | ||
| 22 | mkdir -p -m 755 $(PREFIX)/bin | ||
| 23 | install -m 755 snac $(PREFIX)/bin/snac | ||
| 24 | mkdir -p -m 755 $(PREFIX_MAN)/man1 | ||
| 25 | install -m 644 doc/snac.1 $(PREFIX_MAN)/man1/snac.1 | ||
| 26 | mkdir -p -m 755 $(PREFIX_MAN)/man5 | ||
| 27 | install -m 644 doc/snac.5 $(PREFIX_MAN)/man5/snac.5 | ||
| 28 | mkdir -p -m 755 $(PREFIX_MAN)/man8 | ||
| 29 | install -m 644 doc/snac.8 $(PREFIX_MAN)/man8/snac.8 | ||
| 30 | |||
| 31 | uninstall: | ||
| 32 | rm $(PREFIX)/bin/snac | ||
| 33 | rm $(PREFIX_MAN)/man1/snac.1 | ||
| 34 | rm $(PREFIX_MAN)/man5/snac.5 | ||
| 35 | rm $(PREFIX_MAN)/man8/snac.8 | ||
| 36 | |||
| 37 | activitypub.o: activitypub.c xs.h xs_json.h xs_curl.h xs_mime.h \ | ||
| 38 | xs_openssl.h xs_regex.h xs_time.h xs_set.h xs_match.h snac.h | ||
| 39 | data.o: data.c xs.h xs_hex.h xs_io.h xs_json.h xs_openssl.h xs_glob.h \ | ||
| 40 | xs_set.h xs_time.h snac.h | ||
| 41 | format.o: format.c xs.h xs_regex.h xs_mime.h xs_html.h snac.h | ||
| 42 | html.o: html.c xs.h xs_io.h xs_json.h xs_regex.h xs_set.h xs_openssl.h \ | ||
| 43 | xs_time.h xs_mime.h xs_match.h xs_html.h snac.h | ||
| 44 | http.o: http.c xs.h xs_io.h xs_openssl.h xs_curl.h xs_time.h xs_json.h \ | ||
| 45 | snac.h | ||
| 46 | httpd.o: httpd.c xs.h xs_io.h xs_json.h xs_socket.h xs_httpd.h xs_mime.h \ | ||
| 47 | xs_time.h xs_openssl.h xs_fcgi.h xs_html.h snac.h | ||
| 48 | main.o: main.c xs.h xs_io.h xs_json.h snac.h xs_html.h | ||
| 49 | mastoapi.o: mastoapi.c xs.h xs_hex.h xs_openssl.h xs_json.h xs_io.h \ | ||
| 50 | xs_time.h xs_glob.h xs_set.h xs_random.h xs_url.h xs_mime.h xs_match.h \ | ||
| 51 | snac.h | ||
| 52 | snac.o: snac.c xs.h xs_hex.h xs_io.h xs_unicode.h xs_json.h xs_curl.h \ | ||
| 53 | xs_openssl.h xs_socket.h xs_url.h xs_httpd.h xs_mime.h xs_regex.h \ | ||
| 54 | xs_set.h xs_time.h xs_glob.h xs_random.h xs_match.h xs_fcgi.h xs_html.h \ | ||
| 55 | snac.h | ||
| 56 | upgrade.o: upgrade.c xs.h xs_io.h xs_json.h xs_glob.h snac.h | ||
| 57 | utils.o: utils.c xs.h xs_io.h xs_json.h xs_time.h xs_openssl.h \ | ||
| 58 | xs_random.h xs_glob.h snac.h | ||
| 59 | webfinger.o: webfinger.c xs.h xs_json.h xs_curl.h xs_mime.h snac.h \ No newline at end of file | ||