mirror of
https://git.swurl.xyz/swirl/pacebin.git
synced 2024-11-22 03:51:29 +00:00
36 lines
732 B
Makefile
36 lines
732 B
Makefile
|
prefix=/usr/local
|
||
|
confdir=/etc
|
||
|
systemd_dir=${DESTDIR}${confdir}/systemd/system
|
||
|
nginx_dir=${DESTDIR}${confdir}/nginx
|
||
|
bindir=${DESTDIR}${prefix}/bin
|
||
|
|
||
|
CC := gcc
|
||
|
CFLAGS := -O2
|
||
|
|
||
|
BIN := pacebin
|
||
|
|
||
|
SOURCE := main.c mongoose.c
|
||
|
OBJ := mongoose.o main.o
|
||
|
DEPS := mongoose.h index.h
|
||
|
LIBS := -lcrypt
|
||
|
|
||
|
all: $(BIN)
|
||
|
|
||
|
clean:
|
||
|
rm -f $(OBJ)
|
||
|
|
||
|
$(BIN): $(OBJ)
|
||
|
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
|
||
|
|
||
|
install-nginx:
|
||
|
@install -Dm644 doc/pastebin.nginx ${nginx_dir}/sites-available/pastebin
|
||
|
|
||
|
install-systemd:
|
||
|
@install -Dm644 doc/pastebin.service ${systemd_dir}/pastebin.service
|
||
|
@install -Dm644 doc/pastebin.conf ${DESTDIR}/${confdir}/pastebin.conf
|
||
|
|
||
|
install-bin:
|
||
|
@install -Dm755 ${BIN} ${bindir}/${BIN}
|
||
|
|
||
|
install: install-bin install-nginx install-systemd
|