|
@@ -1,5 +1,7 @@
|
1
|
1
|
CC = $(CROSS)$(TARGET)gcc
|
2
|
2
|
LINK = $(CROSS)$(TARGET)ld -o
|
|
3
|
+MKDEP = $(CROSS)$(TARGET)$(CC) -M -o $*.d $<
|
|
4
|
+
|
3
|
5
|
LIBRARY_LINK_OPTS = -L. -r
|
4
|
6
|
CFLAGS = -O2 -ggdb -std=c99 -D_GNU_SOURCE
|
5
|
7
|
CFLAGS += -Wall -Wextra -Wshadow -Wformat-security -Wstrict-prototypes
|
|
@@ -33,11 +35,14 @@ tstest: $(tstest_OBJS)
|
33
|
35
|
$(Q)$(CC) $(CFLAGS) $(tstest_OBJS) -o tstest
|
34
|
36
|
|
35
|
37
|
%.o: %.c tsdata.h tsfuncs.h
|
|
38
|
+ @$(MKDEP)
|
36
|
39
|
$(Q)echo " CC libtsfuncs $<"
|
37
|
40
|
$(Q)$(CC) $(CFLAGS) -c $<
|
38
|
41
|
|
|
42
|
+-include $(OBJS:.o=.d)
|
|
43
|
+
|
39
|
44
|
clean:
|
40
|
|
- $(Q)echo " RM $(PROG) $(OBJS)"
|
41
|
|
- $(Q)$(RM) $(PROG) tstest *.o *~
|
|
45
|
+ $(Q)echo " RM $(PROG) $(OBJS:.o=.{o,d})"
|
|
46
|
+ $(Q)$(RM) $(PROG) tstest $(OBJS:.o=.{o,d}) *~
|
42
|
47
|
|
43
|
48
|
distclean: clean
|