1 TOP?= .. 2 include ${TOP}/iconfig.mk 3 4 PROG= test 5 SRCS= test.c 6 SRCS+= test_hmac_md5.c ../crypt/hmac_md5.c 7 8 CFLAGS?= -O2 9 CSTD?= c99 10 CFLAGS+= -std=${CSTD} 11 12 CPPFLAGS+= -I../crypt 13 14 T_COMPAT_SRCS= ${COMPAT_SRCS:compat/%=../compat/%} 15 T_MD5_SRC= ${MD5_SRC:crypt/%=../crypt/%} 16 OBJS+= ${SRCS:.c=.o} ${T_COMPAT_SRCS:.c=.o} ${T_MD5_SRC:.c=.o} 17 18 .c.o: 19 ${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@ 20 21 all: ${PROG} 22 23 clean: 24 rm -f ${OBJS} ${PROG} ${PROG}.core ${CLEANFILES} 25 26 distclean: clean 27 rm -f .depend 28 29 .depend: ${SRCS} ${T_COMPAT_SRCS} ${T_CRYPT_SRCS} 30 ${CC} ${CPPFLAGS} -MM ${SRCS} ${T_COMPAT_SRCS} ${T_CRYPT_SRCS} > .depend 31 32 depend: .depend 33 34 ${PROG}: ${DEPEND} ${OBJS} 35 ${CC} ${LDFLAGS} -o $@ ${OBJS} ${LDADD} 36