7 -include $(TOPDIR)/config.mk
9 -HOSTSRCS := $(obj)crc32.c fw_env.c fw_env_main.c
10 +SRCS := crc32.c fw_env.c fw_env_main.c
13 -# Compile for a hosted environment on the target
14 -HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \
15 - -idirafter $(OBJTREE)/include2 \
16 - -idirafter $(OBJTREE)/include \
19 -ifeq ($(MTD_VERSION),old)
20 -HOSTCPPFLAGS += -DMTD_OLD
22 +CPPFLAGS := -Wall $(CFLAGS)
24 all: $(obj)fw_printenv
26 # Some files complain if compiled with -pedantic, use HOSTCFLAGS_NOPED
27 -$(obj)fw_printenv: $(HOSTSRCS) $(HEADERS)
28 - $(HOSTCC) $(HOSTCFLAGS_NOPED) $(HOSTLDFLAGS) -o $@ $(HOSTSRCS)
29 +$(obj)fw_printenv: $(SRCS) $(HEADERS)
30 + $(CC) $(CPPFLAGS) $(SRCS) -o $(obj)fw_printenv
33 - rm -f $(obj)fw_printenv $(obj)crc32.c
36 - ln -s $(src)../../lib/crc32.c $(obj)crc32.c
38 -#########################################################################
40 -include $(TOPDIR)/rules.mk
42 -sinclude $(obj).depend
44 -#########################################################################
45 + rm -f $(obj)fw_printenv