sparser

Simple parser — extract URLs from text files
git clone git clone https://git.krisyotam.com/krisyotam/sparser.git
Log | Files | Refs | LICENSE

Makefile (755B)


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