|
@@ -1,6 +1,7 @@
|
1
|
|
-CC = $(CROSS)$(TARGET)gcc
|
2
|
|
-LINK = $(CROSS)$(TARGET)ld -o
|
3
|
|
-MKDEP = $(CC) -M -o $*.d $<
|
|
1
|
+CC = cc
|
|
2
|
+LINK = ld -o
|
|
3
|
+CROSS := $(TARGET)
|
|
4
|
+MKDEP = $(CROSS)$(CC) -M -o $*.d $<
|
4
|
5
|
|
5
|
6
|
LIBRARY_LINK_OPTS = -L. -r
|
6
|
7
|
CFLAGS = -O2 -ggdb -std=c99 -D_GNU_SOURCE
|
|
@@ -17,12 +18,12 @@ all: $(PROG)
|
17
|
18
|
|
18
|
19
|
$(PROG): $(OBJS)
|
19
|
20
|
$(Q)echo " LINK $(PROG)"
|
20
|
|
- $(Q)$(LINK) $@ $(LIBRARY_LINK_OPTS) $(OBJS)
|
|
21
|
+ $(Q)$(CROSS)$(LINK) $@ $(LIBRARY_LINK_OPTS) $(OBJS)
|
21
|
22
|
|
22
|
23
|
%.o: %.c libfuncs.h
|
23
|
24
|
@$(MKDEP)
|
24
|
25
|
$(Q)echo " CC libfuncs $<"
|
25
|
|
- $(Q)$(CC) $(CFLAGS) -c $<
|
|
26
|
+ $(Q)$(CROSS)$(CC) $(CFLAGS) -c $<
|
26
|
27
|
|
27
|
28
|
-include $(OBJS:.o=.d)
|
28
|
29
|
|