Mercurial > hg > toybox
comparison Makefile @ 38:b707dfcd403c
Reduce flag duplication and make kconfig use HOST_CC.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 26 Nov 2006 17:18:29 -0500 |
parents | 7d3f0ff39878 |
children | a43bdc6f53af |
comparison
equal
deleted
inserted
replaced
37:14d27eab3acf | 38:b707dfcd403c |
---|---|
1 # Makefile for toybox. | 1 # Makefile for toybox. |
2 # Copyright 2006 Rob Landley <rob@landley.net> | 2 # Copyright 2006 Rob Landley <rob@landley.net> |
3 | 3 |
4 CFLAGS = -Wall -Wundef -Os -s | 4 CFLAGS = -Wall -Wundef -Os -s |
5 CC = $(CROSS_COMPILE)gcc $(CFLAGS) | 5 CC = $(CROSS_COMPILE)gcc $(CFLAGS) -funsigned-char |
6 HOST_CC = gcc $(CFLAGS) | 6 HOST_CC = gcc $(CFLAGS) -funsigned-char |
7 | 7 |
8 all: toybox | 8 all: toybox |
9 | 9 |
10 .PHONY: clean | 10 .PHONY: clean |
11 | 11 |
27 | 27 |
28 # Actual build | 28 # Actual build |
29 | 29 |
30 toyfiles = main.c toys/*.c lib/*.c | 30 toyfiles = main.c toys/*.c lib/*.c |
31 toybox: gen_config.h $(toyfiles) toys/toylist.h lib/lib.h toys.h | 31 toybox: gen_config.h $(toyfiles) toys/toylist.h lib/lib.h toys.h |
32 $(CC) -Wall -Os -s -funsigned-char $(CFLAGS) -I . \ | 32 $(CC) $(CFLAGS) -I . $(toyfiles) -o toybox \ |
33 $(toyfiles) -o toybox -ffunction-sections -fdata-sections -Wl,--gc-sections | 33 -ffunction-sections -fdata-sections -Wl,--gc-sections |
34 | 34 |
35 clean:: | 35 clean:: |
36 rm -f toybox gen_config.h | 36 rm -f toybox gen_config.h |
37 | 37 |
38 distclean: clean | 38 distclean: clean |