Browse Source

build: Allow changing CC even when CROSS is set.

Georgi Chorbadzhiyski 10 years ago
parent
commit
12d9ca9789
1 changed files with 6 additions and 5 deletions
  1. 6
    5
      Makefile

+ 6
- 5
Makefile View File

@@ -1,5 +1,6 @@
1
-CC = $(CROSS)$(TARGET)gcc
2
-STRIP = $(CROSS)$(TARGET)strip
1
+CC = cc
2
+STRIP = strip
3
+CROSS := $(TARGET)
3 4
 CFLAGS = -ggdb -Wall -Wextra -Wshadow -Wformat-security -Wno-strict-aliasing -O2
4 5
 RM = /bin/rm -f
5 6
 Q = @
@@ -18,15 +19,15 @@ $(FUNCS_LIB):
18 19
 
19 20
 tomcast: $(tomcast_OBJS)
20 21
 	$(Q)echo "  LINK	tomcast"
21
-	$(Q)$(CC) $(CFLAGS) $(tomcast_OBJS) $(LIBS) -o tomcast
22
+	$(Q)$(CROSS)$(CC) $(CFLAGS) $(tomcast_OBJS) $(LIBS) -o tomcast
22 23
 
23 24
 %.o: %.c
24 25
 	$(Q)echo "  CC	tomcast		$<"
25
-	$(Q)$(CC) $(CFLAGS)  -c $<
26
+	$(Q)$(CROSS)$(CC) $(CFLAGS)  -c $<
26 27
 
27 28
 strip:
28 29
 	$(Q)echo "  STRIP	tomcast"
29
-	$(Q)$(STRIP) tomcast
30
+	$(Q)$(CROSS)$(STRIP) tomcast
30 31
 
31 32
 clean:
32 33
 	$(Q)echo "  RM	$(tomcast_OBJS)"

Loading…
Cancel
Save