From 098c0e171c0cd3653d47cda787ca0c4a761f8bce Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Thu, 10 May 2012 12:32:09 -0600 Subject: [PATCH] fixes for ARM build --- Makefile | 5 +++++ packages/cowbull/src/Makefile | 2 +- packages/inferno/inferno.mk | 14 +++++++------- packages/inferno/service/httpd/run | 2 +- packages/mcp/mcp.mk | 20 ++++++++++---------- packages/mcp/service/httpd/run | 3 ++- packages/router/router.mk | 2 +- 7 files changed, 27 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 4b9363b..81e474b 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,11 @@ CACHE = cache # The end result BIN = bin +ifdef ARCH +export CC = ${ARCH}-cc +export STRIP = ${ARCH}-strip +endif + all: packages dist: ctf-install.zip diff --git a/packages/cowbull/src/Makefile b/packages/cowbull/src/Makefile index dd2d47c..9b787e9 100644 --- a/packages/cowbull/src/Makefile +++ b/packages/cowbull/src/Makefile @@ -3,7 +3,7 @@ DESTDIR ?= /tmp build: cowd cowcli cowcli: cowcli.c - $(CC) -o $@ -static $< + cc -o $@ -static $< strip $@ upx $@ diff --git a/packages/inferno/inferno.mk b/packages/inferno/inferno.mk index 308c6f7..49b9118 100644 --- a/packages/inferno/inferno.mk +++ b/packages/inferno/inferno.mk @@ -1,24 +1,24 @@ INFERNO_PKGDIR = $(TARGET)/inferno INFERNO_BUILDDIR = $(BUILD)/inferno -INFERNO_FNORD_CACHE = $(CACHE)/fnord.git -INFERNO_FNORD_URL = http://woozle.org/~neale/projects/fnord +INFERNO_ERIS_CACHE = $(CACHE)/eris.git +INFERNO_ERIS_URL = http://woozle.org/~neale/projects/eris -$(INFERNO_FNORD_CACHE): - git clone --bare $(INFERNO_FNORD_URL) $@ +$(INFERNO_ERIS_CACHE): + git clone --bare $(INFERNO_ERIS_URL) $@ inferno-source: $(INFERNO_BUILDDIR) -$(INFERNO_BUILDDIR): $(INFERNO_FNORD_CACHE) +$(INFERNO_BUILDDIR): $(INFERNO_ERIS_CACHE) git clone $< $@ inferno-build: $(INFERNO_BUILDDIR)/build $(INFERNO_BUILDDIR)/build: $(INFERNO_BUILDDIR) - $(MAKE) -C $(INFERNO_BUILDDIR) fnord-idx + $(MAKE) -C $(INFERNO_BUILDDIR) inferno-install: $(INFERNO_BUILDDIR)/build mkdir -p $(INFERNO_PKGDIR)/bin - cp $(INFERNO_BUILDDIR)/fnord-idx $(INFERNO_PKGDIR)/bin/ + cp $(INFERNO_BUILDDIR)/eris $(INFERNO_PKGDIR)/bin/ $(call COPYTREE, packages/inferno/service, $(INFERNO_PKGDIR)/service) diff --git a/packages/inferno/service/httpd/run b/packages/inferno/service/httpd/run index e04f932..b3d848d 100755 --- a/packages/inferno/service/httpd/run +++ b/packages/inferno/service/httpd/run @@ -4,5 +4,5 @@ exec 2>&1 cd /var/www -exec tcpsvd -l localhost 0 80 /opt/inferno/bin/fnord-idx . . +exec tcpsvd -l localhost 0 80 /opt/inferno/bin/eris -d diff --git a/packages/mcp/mcp.mk b/packages/mcp/mcp.mk index ea8c647..ed90ab2 100644 --- a/packages/mcp/mcp.mk +++ b/packages/mcp/mcp.mk @@ -3,26 +3,26 @@ MCP_BUILDDIR = $(BUILD)/mcp ## -## XXX: clean up fnord like router.mk +## XXX: clean up eris like router.mk ## -FNORD_CACHE = $(CACHE)/fnord.git -FNORD_BUILDDIR = $(MCP_BUILDDIR)/fnord -FNORD_URL = http://woozle.org/~neale/projects/fnord +ERIS_CACHE = $(CACHE)/eris.git +ERIS_BUILDDIR = $(MCP_BUILDDIR)/eris +ERIS_URL = http://woozle.org/~neale/projects/eris -$(FNORD_CACHE): - git clone --bare $(FNORD_URL) $@ +$(ERIS_CACHE): + git clone --bare $(ERIS_URL) $@ mcp-source: $(MCP_BUILDDIR)/source -$(MCP_BUILDDIR)/source: $(FNORD_CACHE) +$(MCP_BUILDDIR)/source: $(ERIS_CACHE) mkdir -p $(@D) - git clone $(FNORD_CACHE) $(@D)/fnord + git clone $(ERIS_CACHE) $(@D)/eris touch $@ mcp-build: $(MCP_BUILDDIR)/build $(MCP_BUILDDIR)/build: $(MCP_BUILDDIR)/source $(MAKE) -C packages/mcp/src build - $(MAKE) -C $(MCP_BUILDDIR)/fnord DIET= CC=$(CC) fnord-cgi + $(MAKE) -C $(MCP_BUILDDIR)/eris mcp-install: $(MCP_BUILDDIR)/build @@ -32,7 +32,7 @@ mcp-install: $(MCP_BUILDDIR)/build cp packages/mcp/src/pointscli $(MCP_PKGDIR)/bin/ cp packages/mcp/src/puzzles.cgi $(MCP_PKGDIR)/bin/ - cp $(MCP_BUILDDIR)/fnord/fnord-cgi $(MCP_PKGDIR)/bin/ + cp $(MCP_BUILDDIR)/eris/eris $(MCP_PKGDIR)/bin/ $(call COPYTREE, packages/mcp/service, $(MCP_PKGDIR)/service) diff --git a/packages/mcp/service/httpd/run b/packages/mcp/service/httpd/run index 182c5cf..4180bbd 100755 --- a/packages/mcp/service/httpd/run +++ b/packages/mcp/service/httpd/run @@ -18,4 +18,5 @@ for d in /opt/*; do fi done -exec tcpsvd -u ctf ${IP%/*} 80 /opt/mcp/bin/fnord-cgi /var/www +cd /var/www +exec tcpsvd -u ctf ${IP%/*} 80 /opt/mcp/bin/eris -c diff --git a/packages/router/router.mk b/packages/router/router.mk index c101883..f9e5158 100644 --- a/packages/router/router.mk +++ b/packages/router/router.mk @@ -59,7 +59,7 @@ $(ECMH_BUILDDIR): $(ECMH_CACHE) router-build: $(ROUTER_BUILDDIR)/ecmh-build $(ROUTER_BUILDDIR)/ecmh-build: $(ECMH_BUILDDIR) - $(MAKE) -C $(ECMH_BUILDDIR)/src ECMH_VERSION=dbtl-git + $(MAKE) -C $(ECMH_BUILDDIR)/src ECMH_VERSION=dbtl-git STRIP=$(STRIP) $(MAKE) -C $(ECMH_BUILDDIR)/tools/mtrace6 touch $@