36 lines
727 B
Makefile
36 lines
727 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 ${CFLAGS}
|
|
|
|
BIN := gsl
|
|
|
|
SOURCE := main.c mongoose.c
|
|
OBJ := mongoose.o main.o
|
|
DEPS := mongoose.h index.h lgsl.h agsl.h gsl.
|
|
LIBS := -lcrypt
|
|
|
|
all: $(BIN)
|
|
|
|
clean:
|
|
rm -f $(OBJ)
|
|
|
|
$(BIN): $(OBJ)
|
|
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
|
|
|
|
install-nginx:
|
|
@install -Dm644 doc/gsl.nginx ${nginx_dir}/sites-available/gsl
|
|
|
|
install-systemd:
|
|
@install -Dm644 doc/gsl.service ${systemd_dir}/gsl.service
|
|
@install -Dm644 doc/gsl.conf ${DESTDIR}/${confdir}/gsl.conf
|
|
|
|
install-bin:
|
|
@install -Dm755 ${BIN} ${bindir}/${BIN}
|
|
|
|
install: install-bin install-nginx install-systemd
|