ppc64: Don't set Kp bit on SLB
[openbios.git] / Makefile.target
blob934b95a027392af16944da8312bd5e9fe3e8b0ed
2 #  OpenBIOS Makefile
3 # (C) 2004-2009 by the OpenBIOS team
6 include config.mak
8 ODIR := .
9 SRCDIR := ..
10 HOSTCC := gcc
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 -Wnested-externs
16 HOSTCFLAGS+= -W
17 # Flags for dependency generation
18 HOSTCFLAGS+= -MMD -MP -MT $@ -MF '$(*D)/$(*F).d'
19 HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
21 CC     := $(TARGET)gcc
22 AS     := $(TARGET)as
23 AR     := $(TARGET)ar
24 LD     := $(TARGET)ld
25 NM     := $(TARGET)nm
26 STRIP  := $(TARGET)strip
27 RANLIB := $(TARGET)ranlib
29 CFLAGS+= -Os -g -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS
30 CFLAGS+= -Wall -Wredundant-decls -Wshadow -Wpointer-arith
31 CFLAGS+= -Wstrict-prototypes -Wmissing-declarations -Wundef -Wendif-labels
32 CFLAGS+= -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -Wnested-externs
33 CFLAGS+= -Werror
34 # Flags for dependency generation
35 CFLAGS+= -MMD -MP -MT $@ -MF '$(*D)/$(*F).d'
36 INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
37 AS_FLAGS+= -g
39 quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1))
42 # pre rules
45 all: versions dictionaries host-libraries target-libraries host-executables target-executables
47 versions: $(ODIR)/target/include/openbios-version.h $(ODIR)/forth/version.fs
49 $(ODIR)/forth/version.fs:
50         $(call quiet-command,true, "  GEN   $(TARGET_DIR)$@")
51         @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ;  \
52                 ( echo ": builddate \" $$DATE\" ; " ;     \
53                   echo ": version \" $(VERSION)\" ; " ; ) \
54                   > $(dir $@)/version.fs
56 $(ODIR)/target/include/openbios-version.h:
57         $(call quiet-command,true, "  GEN   $(TARGET_DIR)$@")
58         @DATE="$(shell echo `LC_ALL=C TZ=UTC date +'%b %e %Y %H:%M'`)" ; \
59           ( echo "#define OPENBIOS_BUILD_DATE \"$$DATE\"" ; \
60            echo "#define OPENBIOS_VERSION_STR \"$(VERSION)\"" ; ) \
61          > $(dir $@)/openbios-version.h
63 info:
64         @echo "Building OpenBIOS on $(HOSTARCH) for $(ARCH)"
66 clean:
67         @printf "Cleaning up for $(ARCH)..."
68         @rm -rf forth.dict.core forthstrap *.dict openbios-*
69         @rm -f $(ODIR)/target/include/openbios-version.h $(ODIR)/forth/version.fs
70         @find . -type f \( -name "*~" -o -name '*.o' -o -name '*.d' -o -name '*.a' \) -exec rm \{\} \;
71         @echo " ok"
73 build-verbose: info build
75 build: all
77 include rules.mak
79 # Include automatically generated dependency files
80 -include $(wildcard $(ODIR)/*.d $(ODIR)/host/kernel/*.d $(ODIR)/target/*/*.d $(ODIR)/target/*/*/*.d $(ODIR)/target/*/*/*/*.d)