sbot

Simple web archiver — self-contained GWTAR archives
git clone git clone https://git.krisyotam.com/krisyotam/sbot.git
Log | Files | Refs | README | LICENSE

Makefile (882B)


      1 # sbot - Simple Archiver Bot
      2 # See LICENSE file for copyright and license details.
      3 
      4 VERSION = 0.3.0
      5 
      6 # paths
      7 PREFIX = /usr/local
      8 MANPREFIX = $(PREFIX)/share/man
      9 
     10 # includes and libs
     11 INCS = `pkg-config --cflags libcurl`
     12 LIBS = `pkg-config --libs libcurl`
     13 
     14 # flags
     15 CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\"
     16 CFLAGS   = -std=c99 -pedantic -Wall -Wextra -Os $(INCS) $(CPPFLAGS)
     17 LDFLAGS  = $(LIBS)
     18 
     19 # compiler
     20 CC = cc
     21 
     22 # sources
     23 SRC = archiver.c crawl.c detect.c fetch.c parse.c robots.c util.c
     24 OBJ = $(SRC:.c=.o)
     25 
     26 all: sbot
     27 
     28 .c.o:
     29 	$(CC) $(CFLAGS) -c $<
     30 
     31 sbot: $(OBJ)
     32 	$(CC) -o $@ $(OBJ) $(LDFLAGS)
     33 
     34 clean:
     35 	rm -f sbot $(OBJ)
     36 
     37 install: all
     38 	mkdir -p $(DESTDIR)$(PREFIX)/bin
     39 	cp -f sbot $(DESTDIR)$(PREFIX)/bin
     40 	chmod 755 $(DESTDIR)$(PREFIX)/bin/sbot
     41 
     42 uninstall:
     43 	rm -f $(DESTDIR)$(PREFIX)/bin/sbot
     44 
     45 .PHONY: all clean install uninstall