lib/Makefile

changeset 7
d74b26b2f217
child 16
f4cbe008da72
equal deleted inserted replaced
6:9db76e20e21e 7:d74b26b2f217
1 # Makefile for the library files.
2
3 include ../Makefile.global
4
5 SRCS = xutil.c rdconfig.c
6 OBJS = xutil.o rdconfig.o
7 HDRS = mbselib.h
8 TARGET = libmbse.a
9
10 #############################################################################
11
12 .c.o:
13 ${CC} ${CFLAGS} ${INCLUDES} ${DEFINES} -c $<
14
15 all: ${TARGET}
16
17 libmbse.a: ${OBJS}
18 ar r $@ $?
19 ${RANLIB} $@
20
21 clean:
22 rm -f ${TARGET} *.o *.h~ *.c~ core filelist Makefile.bak
23
24 depend:
25 @rm -f Makefile.bak; \
26 mv Makefile Makefile.bak; \
27 sed -e '/^# DO NOT DELETE/,$$d' Makefile.bak >Makefile; \
28 ${ECHO} '# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT' >>Makefile; \
29 ${ECHO} '# Dependencies generated by make depend' >>Makefile; \
30 for f in ${SRCS}; \
31 do \
32 ${ECHO} "Dependencies for $$f:\c"; \
33 ${ECHO} "`basename $$f .c`.o:\c" >>Makefile; \
34 for h in `sed -n -e \
35 's/^#[ ]*include[ ]*"\([^"]*\)".*/\1/p' $$f`; \
36 do \
37 ${ECHO} " $$h\c"; \
38 ${ECHO} " $$h\c" >>Makefile; \
39 done; \
40 ${ECHO} " done."; \
41 ${ECHO} "" >>Makefile; \
42 done; \
43 ${ECHO} '# End of generated dependencies' >>Makefile
44
45 # DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT
46 # Dependencies generated by make depend
47 xutil.o: ../config.h mbselib.h
48 rdconfig.o: ../config.h mbselib.h
49 # End of generated dependencies

mercurial