gawk

Sed-like interface to the Gopher protocol
git clone git://jacobedwards.org/gawk
Log | Files | Refs | LICENSE

Makefile (606B)


      1 TARGET = gawk
      2 OBJS   = main.o util.o command.o strtonum.o net.o
      3 
      4 # paths
      5 PREFIX    = /usr/local
      6 MANPREFIX = ${PREFIX}/man
      7 
      8 # compiler and linker
      9 CC     = cc
     10 CFLAGS = -std=c99 -Wall -pedantic -O2
     11 
     12 all: ${TARGET}
     13 
     14 .c.o:
     15 	${CC} -c ${CFLAGS} $<
     16 
     17 ${OBJS}: Makefile config.h
     18 
     19 config.h:
     20 	cp config.def.h $@
     21 
     22 ${TARGET}: config.h ${OBJS}
     23 	${CC} -o $@ ${OBJS}
     24 
     25 clean:
     26 	rm -f ${TARGET} ${OBJS}
     27 
     28 install: ${TARGET}
     29 	mv -f ${TARGET} ${PREFIX}/bin/${TARGET}
     30 	cp -f ${TARGET}.1 ${MANPREFIX}/man1/${TARGET}.1
     31 
     32 uninstall:
     33 	rm -f ${PREFIX}/bin/${TARGET}
     34 	rm -f ${MANPREFIX}/man1/${TARGET}.1
     35 
     36 .PHONY: clean install uninstall