3 # (C) 2004-2009 by the OpenBIOS team
12 HOSTCFLAGS+= -O2 -g -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS)
13 HOSTCFLAGS+= -Wall -Wredundant-decls -Wshadow -Wpointer-arith
14 HOSTCFLAGS+= -Wstrict-prototypes -Wmissing-declarations -Wundef -Wendif-labels
15 HOSTCFLAGS+= -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
17 HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
24 STRIP := $(TARGET)strip
25 RANLIB := $(TARGET)ranlib
27 CFLAGS+= -Os -g -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS
28 CFLAGS+= -Wall -Wredundant-decls -Wshadow -Wpointer-arith
29 CFLAGS+= -Wstrict-prototypes -Wmissing-declarations -Wundef -Wendif-labels
30 CFLAGS+= -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes
32 INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
35 quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1))
41 all: versions dictionaries host-libraries target-libraries host-executables target-executables
43 versions: $(ODIR)/target/include/openbios-version.h $(ODIR)/forth/version.fs
45 $(ODIR)/forth/version.fs:
46 $(call quiet-command,true, " GEN $(TARGET_DIR)$@")
47 @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \
48 ( echo ": builddate \" $$DATE\" ; " ; \
49 echo ": version \" $(VERSION)\" ; " ; ) \
50 > $(dir $@)/version.fs
52 $(ODIR)/target/include/openbios-version.h:
53 $(call quiet-command,true, " GEN $(TARGET_DIR)$@")
54 @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \
55 ( echo "#define OPENBIOS_BUILD_DATE \"$$DATE\"" ; \
56 echo "#define OPENBIOS_VERSION_STR \"$(VERSION)\"" ; ) \
57 > $(dir $@)/openbios-version.h
60 @echo "Building OpenBIOS on $(HOSTARCH) for $(ARCH)"
63 @printf "Cleaning up for $(ARCH)..."
64 @rm -rf forth.dict.core forthstrap *.dict openbios-*
65 @find . -type f -name "*~" -o -name '*.o' -o -name '*.a' -exec rm \{\} \;
68 build-verbose: info build