Split off some of the platform-independent stuff (such as as and ncg).
--HG-- branch : dtrg-buildsystem rename : plat/pc86/build.mk => mach/i386/build.mk rename : plat/pc86/build.mk => mach/i80/build.mk rename : plat/pc86/build.mk => mach/i86/build.mk rename : plat/pc86/build.mk => mach/m68020/build.mk rename : plat/pc86/build.mk => mach/powerpc/build.mk
This commit is contained in:
parent
81778b603f
commit
442306d557
7
Makefile
7
Makefile
|
@ -58,6 +58,13 @@ include mach/proto/ncg/build.mk
|
|||
|
||||
include plat/linux/liblinux/build.mk
|
||||
|
||||
include mach/build.mk
|
||||
include mach/i80/build.mk
|
||||
include mach/i386/build.mk
|
||||
include mach/i86/build.mk
|
||||
include mach/m68020/build.mk
|
||||
# include mach/powerpc/build.mk
|
||||
|
||||
include plat/build.mk
|
||||
include plat/pc86/build.mk
|
||||
include plat/cpm/build.mk
|
||||
|
|
|
@ -31,8 +31,6 @@ endef
|
|||
|
||||
define ackfile-rule
|
||||
$o: $s $(ACK) \
|
||||
$(PLATIND)/descr/$(PLATFORM) \
|
||||
$(PLATDEP)/$(PLATFORM)/as \
|
||||
$(CCOMPILER) \
|
||||
$(PLATFORM_$(PLATFORM)) \
|
||||
$(EM_ENCODE)
|
||||
|
|
12
mach/build.mk
Normal file
12
mach/build.mk
Normal file
|
@ -0,0 +1,12 @@
|
|||
define build-architecture-impl
|
||||
$(eval ARCHITECTURE_$(ARCH) := \
|
||||
$(PLATDEP)/$(ARCH)/as \
|
||||
$(PLATDEP)/$(ARCH)/ncg)
|
||||
|
||||
$(eval PLATFORM := $(ARCH))
|
||||
$(call build-as)
|
||||
$(call build-ncg)
|
||||
endef
|
||||
|
||||
build-architecture = $(eval $(build-architecture-impl))
|
||||
|
8
mach/i386/build.mk
Normal file
8
mach/i386/build.mk
Normal file
|
@ -0,0 +1,8 @@
|
|||
ARCH := i386
|
||||
OPTIMISATION := -O
|
||||
|
||||
D := mach/i386
|
||||
|
||||
$(eval $(call build-architecture))
|
||||
|
||||
|
8
mach/i80/build.mk
Normal file
8
mach/i80/build.mk
Normal file
|
@ -0,0 +1,8 @@
|
|||
ARCH := i80
|
||||
OPTIMISATION := -O
|
||||
|
||||
D := mach/i80
|
||||
|
||||
$(eval $(call build-architecture))
|
||||
|
||||
|
8
mach/i86/build.mk
Normal file
8
mach/i86/build.mk
Normal file
|
@ -0,0 +1,8 @@
|
|||
ARCH := i86
|
||||
OPTIMISATION := -O
|
||||
|
||||
D := mach/i86
|
||||
|
||||
$(eval $(call build-architecture))
|
||||
|
||||
|
8
mach/m68020/build.mk
Normal file
8
mach/m68020/build.mk
Normal file
|
@ -0,0 +1,8 @@
|
|||
ARCH := m68020
|
||||
OPTIMISATION := -O6
|
||||
|
||||
D := mach/m68020
|
||||
|
||||
$(eval $(call build-architecture))
|
||||
|
||||
|
8
mach/powerpc/build.mk
Normal file
8
mach/powerpc/build.mk
Normal file
|
@ -0,0 +1,8 @@
|
|||
ARCH := powerpc
|
||||
OPTIMISATION := -O
|
||||
|
||||
D := mach/powerpc
|
||||
|
||||
$(eval $(call build-architecture))
|
||||
|
||||
|
|
@ -2,7 +2,7 @@ define build-as-impl
|
|||
$(call reset)
|
||||
|
||||
$(eval cflags += -Imach/$(ARCH)/as -I$(OBJDIR)/$D)
|
||||
$(eval objdir := $(PLATFORM))
|
||||
$(eval objdir := $(ARCH))
|
||||
|
||||
$(call cfile, mach/proto/as/comm3.c)
|
||||
$(call dependson, $(OBJDIR)/$D/y.tab.h)
|
||||
|
@ -35,8 +35,8 @@ $(OBJDIR)/$D/preprocessed-comm2.y: mach/proto/as/comm2.y $(CPPANSI)
|
|||
mach/proto/as/comm2.y > $$@
|
||||
|
||||
$(call file, $(LIBOBJECT))
|
||||
$(call cprogram, $(BINDIR)/$(PLATFORM)/as)
|
||||
$(call installto, $(PLATDEP)/$(PLATFORM)/as)
|
||||
$(call cprogram, $(BINDIR)/$(ARCH)/as)
|
||||
$(call installto, $(PLATDEP)/$(ARCH)/as)
|
||||
endef
|
||||
|
||||
build-as = $(eval $(build-as-impl))
|
||||
|
|
|
@ -3,7 +3,7 @@ define build-ncg-impl
|
|||
$(call reset)
|
||||
|
||||
$(eval cflags += -Imach/$(ARCH)/ncg -I$(OBJDIR)/$D -Imach/proto/ncg)
|
||||
$(eval objdir := $(PLATFORM))
|
||||
$(eval objdir := $(ARCH))
|
||||
|
||||
$(call cfile, mach/proto/ncg/codegen.c)
|
||||
$(call cfile, mach/proto/ncg/compute.c)
|
||||
|
@ -37,8 +37,8 @@ $(call cfile, $(OBJDIR)/$D/tables.c)
|
|||
$(call file, $(LIBEM_DATA))
|
||||
$(call file, $(LIBFLT_ARITH))
|
||||
|
||||
$(call cprogram, $(BINDIR)/$(PLATFORM)/ncg)
|
||||
$(call installto, $(PLATDEP)/$(PLATFORM)/ncg)
|
||||
$(call cprogram, $(BINDIR)/$(ARCH)/ncg)
|
||||
$(call installto, $(PLATDEP)/$(ARCH)/ncg)
|
||||
|
||||
endef
|
||||
|
||||
|
|
|
@ -12,8 +12,9 @@ define build-platform-impl
|
|||
$(call installto, $(PLATIND)/descr/$(PLATFORM))
|
||||
|
||||
$(eval PLATFORM_$(PLATFORM) := \
|
||||
$(PLATIND)/descr/$(PLATFORM) \
|
||||
$(PLATFORM_HEADERS_$(PLATFORM)) \
|
||||
$(PLATDEP)/$(PLATFORM)/ncg)
|
||||
$(ARCHITECTURE_$(ARCH)))
|
||||
|
||||
$(foreach f, $(platform-headers), $(call build-platform-headers, $f))
|
||||
|
||||
|
@ -22,9 +23,6 @@ define build-platform-impl
|
|||
$(call acklibrary, $(LIBDIR)/$(PLATFORM)/libsys.a)
|
||||
$(call installto, $(PLATIND)/$(PLATFORM)/libsys.a)
|
||||
|
||||
$(call build-as)
|
||||
$(call build-ncg)
|
||||
|
||||
$(foreach runtime, $(RUNTIMES), $(build-runtime-$(runtime)))
|
||||
endef
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ var C_INCLUDES=-I{EM}/share/ack/{PLATFORM}/include -I{EM}/share/ack/include/ansi
|
|||
name be
|
||||
from .m.g
|
||||
to .s
|
||||
program {EM}/lib/ack/{PLATFORM}/ncg
|
||||
program {EM}/lib/ack/{ARCH}/ncg
|
||||
args <
|
||||
stdout
|
||||
need .e
|
||||
|
@ -31,7 +31,7 @@ end
|
|||
name asopt
|
||||
from .s
|
||||
to .so
|
||||
program {EM}/lib/ack/{PLATFORM}/top
|
||||
program {EM}/lib/ack/{ARCH}/top
|
||||
args
|
||||
optimizer
|
||||
stdin
|
||||
|
@ -40,7 +40,7 @@ end
|
|||
name as
|
||||
from .s.so
|
||||
to .o
|
||||
program {EM}/lib/ack/{PLATFORM}/as
|
||||
program {EM}/lib/ack/{ARCH}/as
|
||||
args - -o > <
|
||||
prep cond
|
||||
end
|
||||
|
|
|
@ -27,7 +27,7 @@ var C_INCLUDES=-I{PLATFORMDIR}/include -I{EM}/share/ack/include/ansi
|
|||
name be
|
||||
from .m.g
|
||||
to .s
|
||||
program {EM}/lib/ack/{PLATFORM}/ncg
|
||||
program {EM}/lib/ack/{ARCH}/ncg
|
||||
mapflag -gdb GF=-gdb
|
||||
args {GF?} <
|
||||
stdout
|
||||
|
@ -36,7 +36,7 @@ end
|
|||
name as
|
||||
from .s.so
|
||||
to .o
|
||||
program {EM}/lib/ack/{PLATFORM}/as
|
||||
program {EM}/lib/ack/{ARCH}/as
|
||||
args - -o > <
|
||||
prep cond
|
||||
end
|
||||
|
|
|
@ -27,7 +27,7 @@ var C_INCLUDES=-I{PLATFORMDIR}/include -I{EM}/share/ack/include/ansi
|
|||
name be
|
||||
from .m.g
|
||||
to .s
|
||||
program {EM}/lib/ack/{PLATFORM}/ncg
|
||||
program {EM}/lib/ack/{ARCH}/ncg
|
||||
mapflag -gdb GF=-gdb
|
||||
args {GF?} <
|
||||
stdout
|
||||
|
@ -36,7 +36,7 @@ end
|
|||
name as
|
||||
from .s.so
|
||||
to .o
|
||||
program {EM}/lib/ack/{PLATFORM}/as
|
||||
program {EM}/lib/ack/{ARCH}/as
|
||||
args - -o > <
|
||||
prep cond
|
||||
end
|
||||
|
|
|
@ -27,7 +27,7 @@ var C_INCLUDES=-I{PLATFORMDIR}/include -I{EM}/share/ack/include/ansi
|
|||
name be
|
||||
from .m.g
|
||||
to .s
|
||||
program {EM}/lib/ack/{PLATFORM}/ncg
|
||||
program {EM}/lib/ack/{ARCH}/ncg
|
||||
mapflag -gdb GF=-gdb
|
||||
args {GF?} <
|
||||
stdout
|
||||
|
@ -36,7 +36,7 @@ end
|
|||
name asopt
|
||||
from .s
|
||||
to .so
|
||||
program {EM}/lib/ack/{PLATFORM}/top
|
||||
program {EM}/lib/ack/{ARCH}/top
|
||||
args
|
||||
optimizer
|
||||
stdin
|
||||
|
@ -45,7 +45,7 @@ end
|
|||
name as
|
||||
from .s.so
|
||||
to .o
|
||||
program {EM}/lib/ack/{PLATFORM}/as
|
||||
program {EM}/lib/ack/{ARCH}/as
|
||||
args - -o > <
|
||||
prep cond
|
||||
end
|
||||
|
|
|
@ -23,7 +23,7 @@ var C_INCLUDES=-I{PLATFORMDIR}/include -I{EM}/share/ack/include/ansi
|
|||
name be
|
||||
from .m.g
|
||||
to .s
|
||||
program {EM}/lib/ack/{PLATFORM}/ncg
|
||||
program {EM}/lib/ack/{ARCH}/ncg
|
||||
args <
|
||||
stdout
|
||||
need .e
|
||||
|
@ -31,7 +31,7 @@ end
|
|||
name as
|
||||
from .s.so
|
||||
to .o
|
||||
program {EM}/lib/ack/{PLATFORM}/as
|
||||
program {EM}/lib/ack/{ARCH}/as
|
||||
args - -o > <
|
||||
prep cond
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue