ircc

Simple IRC client
git clone git://r-36.net/ircc
Log | Files | Refs | LICENSE

Makefile (835B)


      1 PROGRAM = ircc
      2 VERSION = _Lin
      3 
      4 PREFIX = /usr
      5 
      6 CC = cc 
      7 
      8 CFLAGS = -O2 -Wall -I. -I/usr/include 
      9 LDFLAGS = -g -L/usr/lib -L. -lc -lpthread -lssl
     10 
     11 CFILES = ircc.c 
     12 
     13 OBJECTS = ${CFILES:.c=.o}
     14 
     15 all:	$(PROGRAM)
     16 
     17 ${PROGRAM} : ${OBJECTS}
     18 	${CC} ${LDFLAGS} -o ${PROGRAM} ${OBJECTS}
     19 
     20 .SUFFIXES : .c .H
     21 
     22 .c.o :
     23 	${CC} ${CFLAGS} -c $<
     24 .c :
     25 	${CC} ${CFLAGS} -c $<
     26 
     27 
     28 clean :
     29 	@rm -f *.o ${PROGRAM} core *~
     30 
     31 install: $(PROGRAM)
     32 	@mkdir -p ${PREFIX}/bin
     33 	@cp -f ${PROGRAM} ${PREFIX}/bin
     34 	@chmod 755 ${PREFIX}/bin/${PROGRAM}
     35 
     36 uninstall:
     37 	@rm -f ${PREFIX}/bin/$(PROGRAM)
     38 
     39 dist:
     40 	@mkdir -p "${PROGRAM}${VERSION}"
     41 	@ln README Makefile *.c *.h "${PROGRAM}${VERSION}"
     42 	@tar -cf "${PROGRAM}${VERSION}.tar" "${PROGRAM}${VERSION}"
     43 	@gzip "${PROGRAM}${VERSION}.tar"
     44 	@mv "${PROGRAM}${VERSION}.tar.gz" "${PROGRAM}${VERSION}.tgz"
     45 	@rm -rf "${PROGRAM}${VERSION}"
     46