libical

A simple ical library.
git clone git://r-36.net/libical
Log | Files | Refs | README | LICENSE

Makefile (1713B)


      1 # libical – simple ical library
      2 # See LICENSE file for copyright and license details.
      3 
      4 include config.mk
      5 
      6 SRC = ical.c ind.c
      7 OBJ = ${SRC:.c=.o}
      8 SOUT = ${NAME}.a
      9 DOUT = ${NAME}.so
     10 
     11 all: options ${SOUT} ${DOUT} 
     12 
     13 options:
     14 	@echo ${NAME} build options:
     15 	@echo "CFLAGS   = ${CFLAGS}"
     16 	@echo "LDFLAGS  = ${LDFLAGS}"
     17 	@echo "CC       = ${CC}"
     18 
     19 .c.o:
     20 	@echo CC $<
     21 	@${CC} -c ${CFLAGS} $<
     22 
     23 ${OBJ}: config.mk
     24 
     25 ${SOUT}: ${OBJ} 
     26 	@ar rcs ${SOUT} ${OBJ}
     27 
     28 ${DOUT}: ${OBJ} 
     29 	@${CC} -shared ${OBJ} -o ${DOUT}
     30 
     31 icaltest: ${OBJ} icaltest.o
     32 	@echo CC -o $@
     33 	@${CC} -o $@ ${OBJ} icaltest.o ${LDFLAGS}
     34 
     35 test: icaltest
     36 	@echo running icaltest
     37 	./icaltest examples/schedule.en.ics
     38 
     39 clean:
     40 	@echo cleaning
     41 	@rm -f *.so *.a ${NAME} ${OBJ} icaltest icaltest.o ${NAME}-${VERSION}.tar.gz
     42 
     43 dist: clean
     44 	@echo creating dist tarball
     45 	@mkdir -p ${NAME}-${VERSION}
     46 	@cp -R LICENSE Makefile README.md config.mk examples rfc\
     47 		${SRC} *.h ${NAME}-${VERSION}
     48 	@tar -cf ${NAME}-${VERSION}.tar ${NAME}-${VERSION}
     49 	@gzip ${NAME}-${VERSION}.tar
     50 	@rm -rf ${NAME}-${VERSION}
     51 
     52 install: all
     53 	@echo installing libraries to ${DESTDIR}${PREFIX}/lib
     54 	@mkdir -p ${DESTDIR}${PREFIX}/lib
     55 	@cp -f ${NAME}.a ${NAME}.so ${DESTDIR}${PREFIX}/lib
     56 	@chmod 755 ${DESTDIR}${PREFIX}/lib/${NAME}.*
     57 	@echo installing header file to ${DESTDIR}${PREFIX}/include
     58 	@mkdir -p ${DESTDIR}${PREFIX}/include
     59 	@cp -f ical.h ${DESTDIR}${PREFIX}/include
     60 	@chmod 644 ${DESTDIR}${PREFIX}/include/ical.h
     61 
     62 uninstall:
     63 	@echo removing libraries from ${DESTDIR}${PREFIX}/bin
     64 	@rm -f ${DESTDIR}${PREFIX}/lib/${NAME}.*
     65 	@echo removing header file from ${DESTDIR}${PREFIX}/include
     66 	@rm -f ${DESTDIR}${PREFIX}/include/ical.h
     67 
     68 .PHONY: all options clean dist install uninstall test
     69 # DO NOT DELETE