summaryrefslogtreecommitdiff
path: root/src/lib9/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib9/Makefile')
-rw-r--r--src/lib9/Makefile36
1 files changed, 9 insertions, 27 deletions
diff --git a/src/lib9/Makefile b/src/lib9/Makefile
index ccaf41a0f..a10d7730a 100644
--- a/src/lib9/Makefile
+++ b/src/lib9/Makefile
@@ -2,7 +2,8 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-include ../Make.conf
+include ../Make.inc
+O:=$(HOST_O)
LIB=lib9.a
@@ -101,38 +102,19 @@ OFILES=\
$(UTFOFILES)\
HFILES=\
- "$(GOROOT)"/include/u.h\
- "$(GOROOT)"/include/libc.h\
+ $(QUOTED_GOROOT)/include/u.h\
+ $(QUOTED_GOROOT)/include/libc.h\
-install: $(LIB)
- cp $(LIB) "$(GOROOT)/lib"
+include ../Make.clib
-$(LIB): $(OFILES)
- ar rsc $(LIB) $(OFILES)
+GOROOT_FINAL?=$(GOROOT)
%.$O: fmt/%.c
- $(CC) -c $(CFLAGS) -DPLAN9PORT -Ifmt $<
+ $(HOST_CC) -c $(HOST_CFLAGS) -DPLAN9PORT -Ifmt $<
%.$O: utf/%.c
- $(CC) -c $(CFLAGS) $<
+ $(HOST_CC) -c $(HOST_CFLAGS) $<
goos.$O: goos.c
- $(CC) -c $(CFLAGS) -DGOOS='"$(GOOS)"' -DGOARCH='"$(GOARCH)"' -DGOROOT='"$(GOROOT)"' -DGOVERSION='"'"$$(../version.bash)"'"' $<
-
-clean:
- rm -f *.$O *.6 6.out $(LIB)
-
-nuke: clean
- rm -f "$(GOROOT)"/lib/$(LIB)
-
-#XLIB=$PLAN9/lib/$LIB
-
-#testfmt: testfmt.$O $XLIB
-# $LD -o $target testfmt.$O
-
-#testfltfmt: testfltfmt.$O $XLIB
-# $LD -o $target testfltfmt.$O
-
-#testprint: testprint.$O $XLIB
-# $LD -o $target testprint.$O
+ $(HOST_CC) -c $(HOST_CFLAGS) -DGOOS='"$(GOOS)"' -DGOARCH='"$(GOARCH)"' -DGOROOT='"$(GOROOT_FINAL)"' -DGOVERSION='"'"$$(../version.bash)"'"' $<