1 # -----------------------------------------------------------------------------
2 # $Id: Makefile,v 1.11 1998/12/02 13:21:15 simonm Exp $
6 include $(TOP)/mk/boilerplate.mk
11 H_FILES = $(wildcard *.h)
14 # Header file built from the configure script's findings
18 all :: $(H_CONFIG) NativeDefs.h
20 # The fptools configure script creates the configuration header file
21 # and puts it in fptools/mk/config.h. We copy it down to here, prepending
22 # some make variables specifying cpp platform variables.
24 $(H_CONFIG) : $(FPTOOLS_TOP)/mk/config.h
27 @echo "Creating $@..."
29 @echo "#define HostPlatform_TYPE $(HostPlatform_CPP)" > $@
30 @echo "#define TargetPlatform_TYPE $(HostPlatform_CPP)" >> $@
31 @echo "#define BuildPlatform_TYPE $(HostPlatform_CPP)" >> $@
33 @echo "#define $(HostPlatform_CPP)_HOST 1" >> $@
34 @echo "#define $(HostPlatform_CPP)_TARGET 1" >> $@
35 @echo "#define $(HostPlatform_CPP)_BUILD 1" >> $@
37 @echo "#define $(HostArch_CPP)_HOST_ARCH 1" >> $@
38 @echo "#define $(HostArch_CPP)_TARGET_ARCH 1" >> $@
39 @echo "#define $(HostArch_CPP)_BUILD_ARCH 1" >> $@
40 @echo "#define HOST_ARCH \"$(HostArch_CPP)\"" >> $@
42 @echo "#define $(HostOS_CPP)_HOST_OS 1" >> $@
43 @echo "#define $(HostOS_CPP)_TARGET_OS 1" >> $@
44 @echo "#define $(HostOS_CPP)_BUILD_OS 1" >> $@
45 @echo "#define HOST_OS \"$(HostOS_CPP)\"" >> $@
46 ifeq "$(HostOS_CPP)" "irix"
47 @echo "#ifndef $(IRIX_MAJOR)_TARGET_OS " >> $@
48 @echo "#define $(IRIX_MAJOR)_TARGET_OS 1" >> $@
52 @echo "#define $(HostVendor_CPP)_HOST_VENDOR 1" >> $@
53 @echo "#define $(HostVendor_CPP)_TARGET_VENDOR 1" >> $@
54 @echo "#define $(HostVendor_CPP)_BUILD_VENDOR 1" >> $@
55 @cat $(FPTOOLS_TOP)/mk/$@ >> $@
58 # ---------------------------------------------------------------------------
59 # Make NativeDefs.h for the NCG
62 C_SRCS = mkNativeHdr.c
64 NativeDefs.h : mkNativeHdr
65 ./mkNativeHdr >NativeDefs.h
67 CLEAN_FILES += NativeDefs.h
69 # ---------------------------------------------------------------------------
72 # Need config.h to make dependencies in the runtime system source.
77 # Install all header files
79 # Hackily set the install destination here:
81 # Note: we keep per-platform copies of all the include files
82 # (ditto for interface files). This is not *really* needed, but
83 # it gives (perhaps) a cleaner binary dist structure..might change.
85 override datadir:=$(libdir)/includes
86 INSTALL_DATAS += $(H_FILES) $(H_CONFIG)
89 # `make clean' settings:
91 CLEAN_FILES += $(H_CONFIG)
94 # Finally, slurp in the standard targets.
96 include $(TOP)/mk/target.mk