lib/Makefile

changeset 7
d74b26b2f217
child 16
f4cbe008da72
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lib/Makefile	Wed Apr 23 14:25:09 2014 +0200
@@ -0,0 +1,49 @@
+# Makefile for the library files.
+
+include ../Makefile.global
+
+SRCS		= xutil.c rdconfig.c
+OBJS		= xutil.o rdconfig.o
+HDRS		= mbselib.h
+TARGET		= libmbse.a
+
+#############################################################################
+
+.c.o:
+		${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $<
+
+all:		${TARGET}
+
+libmbse.a:	${OBJS}
+		ar r $@ $?
+		${RANLIB} $@
+
+clean:
+		rm -f ${TARGET} *.o *.h~ *.c~ core filelist Makefile.bak
+
+depend:
+		@rm -f Makefile.bak; \
+		mv Makefile Makefile.bak; \
+		sed -e '/^# DO NOT DELETE/,$$d' Makefile.bak >Makefile; \
+		${ECHO} '# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT' >>Makefile; \
+		${ECHO} '# Dependencies generated by make depend' >>Makefile; \
+		for f in ${SRCS}; \
+		do \
+			${ECHO} "Dependencies for $$f:\c"; \
+			${ECHO} "`basename $$f .c`.o:\c" >>Makefile; \
+			for h in `sed -n -e \
+				's/^#[  ]*include[      ]*"\([^"]*\)".*/\1/p' $$f`; \
+			do \
+				${ECHO} " $$h\c"; \
+				${ECHO} " $$h\c" >>Makefile; \
+			done; \
+			${ECHO} " done."; \
+			${ECHO} "" >>Makefile; \
+		done; \
+		${ECHO} '# End of generated dependencies' >>Makefile
+
+# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT
+# Dependencies generated by make depend
+xutil.o: ../config.h mbselib.h
+rdconfig.o: ../config.h mbselib.h
+# End of generated dependencies

mercurial