Root/package/uboot-envtools/patches/002-makefile.patch

1--- a/Makefile
2+++ b/Makefile
3@@ -21,34 +21,17 @@
4 # MA 02111-1307 USA
5 #
6 
7-include $(TOPDIR)/config.mk
8-
9-HOSTSRCS := $(SRCTREE)/lib/crc32.c fw_env.c fw_env_main.c
10+SRCS := crc32.c fw_env.c fw_env_main.c
11 HEADERS := fw_env.h
12 
13-# Compile for a hosted environment on the target
14-HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \
15- -idirafter $(OBJTREE)/include2 \
16- -idirafter $(OBJTREE)/include \
17- -DUSE_HOSTCC
18-
19-ifeq ($(MTD_VERSION),old)
20-HOSTCPPFLAGS += -DMTD_OLD
21-endif
22-
23-all: $(obj)fw_printenv
24-
25-# Some files complain if compiled with -pedantic, use HOSTCFLAGS_NOPED
26-$(obj)fw_printenv: $(HOSTSRCS) $(HEADERS)
27- $(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTLDFLAGS) -o $@ $(HOSTSRCS)
28+CPPFLAGS := -Wall $(CFLAGS)
29 
30-clean:
31- rm -f $(obj)fw_printenv
32+all: fw_printenv
33 
34-#########################################################################
35+fw_printenv: $(SRCS) $(HEADERS)
36+ $(CC) $(CPPFLAGS) $(SRCS) -o fw_printenv
37 
38-include $(TOPDIR)/rules.mk
39-
40-sinclude $(obj).depend
41+clean:
42+ rm -f fw_printenv
43 
44 #########################################################################
45

Archive Download this file



interactive