swps

Static Web Page Server
git clone https://noxz.tech/git/swps.git
Log | Files | LICENSE

Makefile
1.POSIX:
2
3include config.mk
4
5SRC = swps.c
6OBJ = $(SRC:.c=.o)
7
8all: options swps
9
10options:
11	@echo swps build options:
12	@echo "VERSION = $(VERSION)"
13	@echo "PREFIX  = $(PREFIX)"
14	@echo "CFLAGS  = $(STCFLAGS)"
15	@echo "CC      = $(CC)"
16
17.c.o:
18	$(CC) $(STCFLAGS) -c $<
19
20$(OBJ): config.mk
21
22swps: $(OBJ)
23	$(CC) -o $@ $(OBJ) $(STCFLAGS)
24
25clean:
26	rm -f swps $(OBJ)
27
28install: swps
29	@echo installing executable to ${PREFIX}/bin
30	mkdir -p $(PREFIX)/bin
31	cp -f swps $(PREFIX)/bin
32	chmod 755 $(PREFIX)/bin/swps
33	@echo installing manual page to ${MANPREFIX}/man1
34	mkdir -p $(MANPREFIX)/man1
35	cp -f swps.1 $(MANPREFIX)/man1/swps.1
36	chmod 644 $(MANPREFIX)/man1/swps.1
37
38uninstall:
39	rm -f $(PREFIX)/bin/swps
40	rm -f $(MANPREFIX)/man1/swps.1
41
42.PHONY: all options clean install uninstall