aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Lohoff <flo@rfc822.org>2008-10-04 12:45:43 +0000
committerGuido G√ľnther <agx@sigxcpu.org>2009-04-26 15:26:19 +0200
commitd8a73fe012567565113419dc0c4678df5abe5bc5 (patch)
tree83fe7ec624beab65968aaf9dd474048f1b8a48c2
parent3f5a6babb02b56298eb7fb118dc23582cbff932a (diff)
don't build tip22 specially
so we can make debian/rules more straightforward
-rw-r--r--Makefile6
-rw-r--r--debian/arcboot.dirs (renamed from debian/dirs)0
-rwxr-xr-xdebian/rules34
-rw-r--r--debian/tip22.dirs2
-rw-r--r--tip22/Makefile20
5 files changed, 39 insertions, 23 deletions
diff --git a/Makefile b/Makefile
index 4bfb897..7bac668 100644
--- a/Makefile
+++ b/Makefile
@@ -22,13 +22,13 @@ endif
# these contain subarch independent files
SUBARCH_INDEP_DIRS= \
- arclib \
- tip22
# these contain subarch dependent files
SUBARCH_DIRS= \
common \
- ext2load
+ arclib \
+ ext2load \
+ tip22
define indep-tgt
$(foreach sd,$(SUBARCH_INDEP_DIRS),$(1)-subarch-indep-$(sd))
diff --git a/debian/dirs b/debian/arcboot.dirs
index 947a565..947a565 100644
--- a/debian/dirs
+++ b/debian/arcboot.dirs
diff --git a/debian/rules b/debian/rules
index e003fda..ed88571 100755
--- a/debian/rules
+++ b/debian/rules
@@ -34,10 +34,24 @@ build-stamp:
$(MAKE) build-subarch-indep
$(MAKE) clean-subarch-dep
$(MAKE) SUBARCH=IP32 build-subarch-dep
+
cp ext2load/ext2load arcboot.ip32
+ cp tip22/ld.kernel.script ld.kernel.script.IP32
+ cp tip22/ld.ramdisk.script ld.ramdisk.script.IP32
+ cp tip22/ld.script ld.script.IP32
+ cp tip22/ld.script ld.script.IP32
+ cp tip22/tftpload.o tftpload.IP32.o
+
$(MAKE) clean-subarch-dep
$(MAKE) SUBARCH=IP22 build-subarch-dep
+
cp ext2load/ext2load arcboot.ip22
+ cp tip22/ld.kernel.script ld.kernel.script.IP22
+ cp tip22/ld.ramdisk.script ld.ramdisk.script.IP22
+ cp tip22/ld.script ld.script.IP22
+ cp tip22/ld.script ld.script.IP22
+ cp tip22/tftpload.o tftpload.IP22.o
+
touch build-stamp
clean:
@@ -46,7 +60,9 @@ clean:
# Add here commands to clean up after the build process.
$(MAKE) clean
- rm -f arcboot.ip22 arcboot.ip32
+ rm -f arcboot.ip22 arcboot.ip32
+ rm -f ld.script.IP22 ld.ramdisk.script.IP22 ld.kernel.script.IP22 tftpload.IP22.o
+ rm -f ld.script.IP32 ld.ramdisk.script.IP32 ld.kernel.script.IP32 tftpload.IP32.o
dh_clean
@@ -57,13 +73,21 @@ install: build
dh_installdirs
# install arcboot into debian/arcboot
- install -m 644 arcboot.ip22 ${PREFIX_ARCB}/${LIB_ARCB}/arcboot.ip22
install -m 644 arcboot.ip32 ${PREFIX_ARCB}/${LIB_ARCB}/arcboot.ip32
+ install -m 644 arcboot.ip22 ${PREFIX_ARCB}/${LIB_ARCB}/arcboot.ip22
install -m 755 scripts/arcboot ${PREFIX_ARCB}/${BIN_ARCB}/arcboot
- # install tip22 into debian/tip22
- $(MAKE) PREFIX=${PREFIX_TIP22} BINDIR=${BIN_TIP22} LIBDIR=${LIB_TIP22} -C arclib install
- $(MAKE) PREFIX=${PREFIX_TIP22} BINDIR=${BIN_TIP22} LIBDIR=${LIB_TIP22} -C tip22 install
+ install -m 644 tftpload.IP32.o ${PREFIX_TIP22}/${LIB_TIP22}/tftpload.IP32.o
+ install -m 644 ld.kernel.script.IP32 ${PREFIX_TIP22}/${LIB_TIP22}/ld.kernel.script.IP32
+ install -m 644 ld.ramdisk.script.IP32 ${PREFIX_TIP22}/${LIB_TIP22}/ld.ramdisk.script.IP32
+ install -m 644 ld.script.IP32 ${PREFIX_TIP22}/${LIB_TIP22}/ld.script.IP32
+ install -m 755 tip22/tip32 ${PREFIX_TIP22}/${BIN_TIP22}/tip32
+
+ install -m 644 tftpload.IP22.o ${PREFIX_TIP22}/${LIB_TIP22}/tftpload.IP22.o
+ install -m 644 ld.kernel.script.IP22 ${PREFIX_TIP22}/${LIB_TIP22}/ld.kernel.script.IP22
+ install -m 644 ld.ramdisk.script.IP22 ${PREFIX_TIP22}/${LIB_TIP22}/ld.ramdisk.script.IP22
+ install -m 644 ld.script.IP22 ${PREFIX_TIP22}/${LIB_TIP22}/ld.script.IP22
+ install -m 755 tip22/tip22 ${PREFIX_TIP22}/${BIN_TIP22}/tip22
# Install lintian overrides
cp debian/arcboot.lintian-overrides $(CURDIR)/debian/arcboot/usr/share/lintian/overrides/arcboot
diff --git a/debian/tip22.dirs b/debian/tip22.dirs
new file mode 100644
index 0000000..1cc5fc5
--- /dev/null
+++ b/debian/tip22.dirs
@@ -0,0 +1,2 @@
+usr/lib/tip22
+usr/sbin
diff --git a/tip22/Makefile b/tip22/Makefile
index 548371b..48829b4 100644
--- a/tip22/Makefile
+++ b/tip22/Makefile
@@ -17,19 +17,15 @@ BINDIR ?= /usr/sbin
LIBS=${ARCLIB}
BINS=tip22 tip32
-LD_SCRIPTS = ld.kernel.script.$(SUBARCH) ld.ramdisk.script.$(SUBARCH) ld.script.$(SUBARCH)
-OBJECTS = tftpload.$(SUBARCH).o
+LD_SCRIPTS = ld.kernel.script ld.ramdisk.script ld.script
+OBJECTS = tftpload.o
TARGETS = $(OBJECTS) $(LD_SCRIPTS)
# uncomment for debugging
#CFLAGS+=-DDEBUG
-all: ${LIBS} ${BINS}
- @$(MAKE) SUBARCH=IP32 archall
- @$(MAKE) SUBARCH=IP22 archall
-
-archall: $(TARGETS)
+all: ${LIBS} $(TARGETS)
$(ARCLIB):
@@ -42,18 +38,13 @@ $(PRINT_LOADADDR):
%.$(SUBARCH).o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
-%.script.$(SUBARCH): %.script.in
+%.script: %.script.in
LOADADDR=$(LOADADDR); \
OUTPUTFORMAT=$(OUTPUTFORMAT); \
sed -e "s/@@LOADADDR@@/$$LOADADDR/" \
-e "s/@@OUTPUTFORMAT@@/$$OUTPUTFORMAT/" <$< >$@
clean:
- @$(MAKE) SUBARCH=IP32 archclean
- @$(MAKE) SUBARCH=IP22 archclean
- rm -f tags *~
-
-archclean:
@$(MAKE) -C $(ARCLIBDIR) clean
@$(MAKE) -C $(COMMONDIR) clean
rm -f $(TARGETS)
@@ -61,8 +52,7 @@ archclean:
install: all
install -d ${PREFIX}/${BINDIR}
install -m 755 ${BINS} ${PREFIX}/${BINDIR}
- @$(MAKE) SUBARCH=IP32 archinstall
- @$(MAKE) SUBARCH=IP22 archinstall
+ @$(MAKE) SUBARCH=${SUBARCH} archinstall
archinstall:
$(foreach tg,$(TARGETS),install -m 644 $(tg) ${PREFIX}/${LIBDIR};)