blob: f735c7ce5cf7e0c85da4f9d5266fbba513b66597 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
--- cbf/Makefile 2009-08-31 09:35:06.000000000 +0200
+++ cbf/Makefile.new 2009-08-31 10:44:46.000000000 +0200
@@ -362,6 +362,8 @@
$(EXAMPLES)/img.h \
$(INCLUDE)/md5.h
+OBJ = $(subst .c,.o,$(SOURCE))
+
#
# Compile the library and examples
#
@@ -379,11 +381,14 @@
$(LIB):
mkdir $(LIB)
+
+.c.o: $(SOURCE) $(HEADERS)
+ $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c $<
+
#
# CBF library
#
-$(LIB)/libcbf.a: $(SOURCE) $(HEADERS) $(COMMONDEP)
- $(CC) $(CFLAGS) $(INCLUDES) $(WARNINGS) -c $(SOURCE)
+$(LIB)/libcbf.a: $(OBJ) $(COMMONDEP)
$(AR) cr $@ *.o
rm *.o
if [ -f $(RANLIB) ]; then $(RANLIB) $@ ; fi
|