diff options
author | Russ Cox <rsc@golang.org> | 2009-03-30 00:01:07 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-03-30 00:01:07 -0700 |
commit | 0d3a043de9b544ee3fca10fd1070a58f973161c4 (patch) | |
tree | bf180d18aa981bdbf3219e42024b2a50cdf40ea2 /src/runtime/Makefile | |
parent | de9cf52835c134a8e5a0df9a0880caa79b9b9b88 (diff) | |
download | go-0d3a043de9b544ee3fca10fd1070a58f973161c4.tar.gz go-0d3a043de9b544ee3fca10fd1070a58f973161c4.zip |
more 386 runtime - can run tiny c programs.
R=r
DELTA=1926 (1727 added, 168 deleted, 31 changed)
OCL=26876
CL=26878
Diffstat (limited to 'src/runtime/Makefile')
-rw-r--r-- | src/runtime/Makefile | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/src/runtime/Makefile b/src/runtime/Makefile index 633576755b..cd3d3c3100 100644 --- a/src/runtime/Makefile +++ b/src/runtime/Makefile @@ -2,13 +2,32 @@ # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. -CFLAGS=-I$(GOOS) -I$(GOOS)/$(GOARCH) -wF -O=6 +# Set SIZE to 32 or 64. +SIZE_386=32 +SIZE_amd64=64 +SIZE=$(SIZE_$(GOARCH)) + +# Setup CFLAGS. Add -D_64BIT on 64-bit platforms (sorry). +CFLAGS_64=-D_64BIT +CFLAGS=-I$(GOOS) -I$(GOOS)/$(GOARCH) -wF $(CFLAGS_$(SIZE)) + +# Set O to right letter. +O_386=8 +O_amd64=6 +O=$(O_$(GOARCH)) + +# Tools CC=$(O)c AS=$(O)a +AR=6ar # sic LIB=lib.a +# 386-specific object files +OFILES_386=\ + vlop.$O\ + vlrt.$O\ + OFILES=\ array.$O\ asm.$O\ @@ -26,7 +45,7 @@ OFILES=\ mfixalloc.$O\ mgc0.$O\ mheap.$O\ - mheapmap64.$O\ + mheapmap$(SIZE).$O\ msize.$O\ print.$O\ proc.$O\ @@ -41,6 +60,7 @@ OFILES=\ sys.$O\ thread.$O\ traceback.$O\ + $(OFILES_$(GOARCH))\ HFILES=\ runtime.h\ @@ -54,15 +74,15 @@ install: $(LIB) runtime.acid cp runtime.acid $(GOROOT)/acid/runtime.acid $(LIB): $(OFILES) - $(O)ar rc $(LIB) $(OFILES) + $(AR) rc $(LIB) $(OFILES) $(OFILES): $(HFILES) nuke: - rm -f *.$(O) *.a $(GOROOT)/lib/$(LIB) + rm -f *.[68] *.a $(GOROOT)/lib/$(LIB) clean: - rm -f *.$(O) *.a runtime.acid cgo2c + rm -f *.[68] *.a runtime.acid cgo2c %.$O: %.c $(CC) $(CFLAGS) $< |