sic

simple irc client
git clone git://git.suckless.org/sic
Log | Files | Refs | README | LICENSE

Makefile (1438B)


      1 # sic - simple irc client
      2 
      3 include config.mk
      4 
      5 SRC = sic.c
      6 OBJ = ${SRC:.c=.o}
      7 
      8 all: options sic
      9 
     10 options:
     11 	@echo sic build options:
     12 	@echo "CFLAGS   = ${CFLAGS}"
     13 	@echo "LDFLAGS  = ${LDFLAGS}"
     14 	@echo "CC       = ${CC}"
     15 
     16 .c.o:
     17 	@echo CC $<
     18 	@${CC} -c ${CFLAGS} $<
     19 
     20 ${OBJ}: config.h config.mk strlcpy.c util.c
     21 
     22 config.h:
     23 	@echo creating $@ from config.def.h
     24 	@cp config.def.h $@
     25 
     26 sic: ${OBJ}
     27 	@echo CC -o $@
     28 	@${CC} -o $@ ${OBJ} ${LDFLAGS}
     29 
     30 clean:
     31 	@echo cleaning
     32 	@rm -f sic ${OBJ} sic-${VERSION}.tar.gz
     33 
     34 dist: clean
     35 	@echo creating dist tarball
     36 	@mkdir -p sic-${VERSION}
     37 	@cp -R LICENSE Makefile README arg.h config.def.h config.mk sic.1 sic.c util.c strlcpy.c sic-${VERSION}
     38 	@tar -cf sic-${VERSION}.tar sic-${VERSION}
     39 	@gzip sic-${VERSION}.tar
     40 	@rm -rf sic-${VERSION}
     41 
     42 install: all
     43 	@echo installing executable file to ${DESTDIR}${PREFIX}/bin
     44 	@mkdir -p ${DESTDIR}${PREFIX}/bin
     45 	@cp -f sic ${DESTDIR}${PREFIX}/bin
     46 	@chmod 755 ${DESTDIR}${PREFIX}/bin/sic
     47 	@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
     48 	@mkdir -p ${DESTDIR}${MANPREFIX}/man1
     49 	@sed "s/VERSION/${VERSION}/g" < sic.1 > ${DESTDIR}${MANPREFIX}/man1/sic.1
     50 	@chmod 644 ${DESTDIR}${MANPREFIX}/man1/sic.1
     51 
     52 uninstall:
     53 	@echo removing executable file from ${DESTDIR}${PREFIX}/bin
     54 	@rm -f ${DESTDIR}${PREFIX}/bin/sic
     55 	@echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
     56 	@rm -f ${DESTDIR}${MANPREFIX}/man1/sic.1
     57 
     58 .PHONY: all options clean dist install uninstall