lib/Makefile

changeset 51
a03b6dac5398
parent 50
8b5e8f1e172d
child 52
4387a6b11eb3
equal deleted inserted replaced
50:8b5e8f1e172d 51:a03b6dac5398
1 # Makefile for the library files.
2
3 include ../Makefile.global
4
5 SRCS = $(wildcard *.c)
6 OBJS = $(SRCS:.c=.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 rc-switch.o: ../config.h mbselib.h
48 lock.o: ../config.h mbselib.h
49 logger.o: ../config.h mbselib.h
50 lcd-pcf8574.o: ../config.h mbselib.h
51 xutil.o: ../config.h mbselib.h
52 dht11.o: ../config.h mbselib.h
53 rdconfig.o: ../config.h mbselib.h
54 # End of generated dependencies

mercurial