Makefile (1255B)
1 # links - lynx-like alternative character mode WWW browser 2 .POSIX: 3 4 include config.mk 5 6 SRC = \ 7 auth.c\ 8 bfu.c\ 9 bookmark.c\ 10 cache.c\ 11 charsets.c\ 12 compress.c\ 13 connect.c\ 14 cookies.c\ 15 data.c\ 16 default.c\ 17 dns.c\ 18 error.c\ 19 file.c\ 20 html.c\ 21 html_r.c\ 22 html_tbl.c\ 23 http.c\ 24 https.c\ 25 kbd.c\ 26 language.c\ 27 listedit.c\ 28 main.c\ 29 memory.c\ 30 menu.c\ 31 objreq.c\ 32 os_dep.c\ 33 sched.c\ 34 select.c\ 35 session.c\ 36 string.c\ 37 suffix.c\ 38 terminal.c\ 39 types.c\ 40 url.c\ 41 view.c 42 OBJ = $(SRC:.c=.o) 43 44 all: options links 45 46 options: 47 @echo "CFLAGS = $(CFLAGS)" 48 @echo "LDFLAGS = $(LDFLAGS)" 49 @echo "CC = $(CC)" 50 51 .c.o: 52 $(CC) $(CFLAGS) $(INCS) $(CPPFLAGS) -c $< 53 54 config.h: 55 cp config.def.h $@ 56 57 $(OBJ): config.h config.mk 58 59 links: $(OBJ) 60 $(CC) -o $@ $(OBJ) $(LDFLAGS) 61 62 format: 63 clang-format -i $(SRC) links.h os_dep.h setup.h 64 clean: 65 rm -f *.o links 66 67 install: all 68 mkdir -p $(DESTDIR)$(PREFIX)/bin 69 cp -f links $(DESTDIR)$(PREFIX)/bin 70 chmod 755 $(DESTDIR)$(PREFIX)/bin/links 71 mkdir -p $(DESTDIR)$(MANPREFIX)/man1 72 sed s:VERSION:$(VERSION): <links.1 >$(DESTDIR)$(MANPREFIX)/man1/links.1 73 chmod 644 $(DESTDIR)$(MANPREFIX)/man1/links.1 74 75 uninstall: 76 rm -f $(DESTDIR)$(PREFIX)/bin/links 77 rm -f $(DESTDIR)$(MANPREFIX)/man1/links.1 78 79 .PHONY: all options clean install uninstall