summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--make/bison.mk58
-rw-r--r--make/bzip2.mk45
-rw-r--r--make/diffutils.mk57
-rw-r--r--make/ed.mk52
-rw-r--r--make/file.mk58
-rw-r--r--make/flex.mk77
-rw-r--r--make/patch.mk55
7 files changed, 402 insertions, 0 deletions
diff --git a/make/bison.mk b/make/bison.mk
new file mode 100644
index 000000000..512e1eb7b
--- /dev/null
+++ b/make/bison.mk
@@ -0,0 +1,58 @@
+#############################################################
+#
+# bison
+#
+#############################################################
+BISON_SOURCE:=bison-1.75.tar.bz2
+BISON_SITE:=ftp://ftp.gnu.org/gnu/bison
+BISON_DIR:=$(BUILD_DIR)/bison-1.75
+BISON_CAT:=bzcat
+BISON_BINARY:=src/bison
+BISON_TARGET_BINARY:=usr/bin/bison
+
+$(DL_DIR)/$(BISON_SOURCE):
+ $(WGET) -P $(DL_DIR) $(BISON_SITE)/$(BISON_SOURCE)
+
+bison-source: $(DL_DIR)/$(BISON_SOURCE)
+
+$(BISON_DIR)/.unpacked: $(DL_DIR)/$(BISON_SOURCE)
+ $(BISON_CAT) $(DL_DIR)/$(BISON_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ touch $(BISON_DIR)/.unpacked
+
+$(BISON_DIR)/.configured: $(BISON_DIR)/.unpacked
+ (cd $(BISON_DIR); rm -rf config.cache; \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --disable-nls \
+ );
+ touch $(BISON_DIR)/.configured
+
+$(BISON_DIR)/$(BISON_BINARY): $(BISON_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) -C $(BISON_DIR)
+
+$(TARGET_DIR)/$(BISON_TARGET_BINARY): $(BISON_DIR)/$(BISON_BINARY)
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BISON_DIR) install
+ rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
+ $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
+ (cd $(TARGET_DIR)/usr/bin; ln -s bison yacc)
+
+bison: uclibc $(TARGET_DIR)/$(BISON_TARGET_BINARY)
+
+bison-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(BISON_DIR) uninstall
+ -$(MAKE) -C $(BISON_DIR) clean
+
+bison-dirclean:
+ rm -rf $(BISON_DIR)
+
diff --git a/make/bzip2.mk b/make/bzip2.mk
new file mode 100644
index 000000000..e1595d660
--- /dev/null
+++ b/make/bzip2.mk
@@ -0,0 +1,45 @@
+#############################################################
+#
+# bzip2
+#
+#############################################################
+BZIP2_SOURCE=bzip2-1.0.2.tar.gz
+BZIP2_SITE=ftp://sources.redhat.com/pub/bzip2/v102
+BZIP2_DIR=$(BUILD_DIR)/bzip2-1.0.2
+
+ifeq ($(strip $(BUILD_WITH_LARGEFILE)),true)
+BZIP2_CFLAGS="-Os -g -mpreferred-stack-boundary=2 -falign-functions=1 -falign-jumps=0 -falign-loops=0 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64"
+else
+BZIP2_CFLAGS="-Os -g -mpreferred-stack-boundary=2 -falign-functions=1 -falign-jumps=0 -falign-loops=0"
+endif
+
+$(DL_DIR)/$(BZIP2_SOURCE):
+ $(WGET) -P $(DL_DIR) $(BZIP2_SITE)/$(BZIP2_SOURCE)
+
+$(BZIP2_DIR)/.source: $(DL_DIR)/$(BZIP2_SOURCE)
+ zcat $(DL_DIR)/$(BZIP2_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ touch $(BZIP2_DIR)/.source
+
+$(BZIP2_DIR)/libbz2.a: $(BZIP2_DIR)/.source
+ $(MAKE) CC=$(TARGET_CC1) AR=$(TARGET_CROSS)ar RANLIB=$(TARGET_CROSS)ranlib \
+ CFLAGS=$(BZIP2_CFLAGS) -C $(BZIP2_DIR) libbz2.a;
+ touch -c $(BZIP2_DIR)/libbz2.a
+
+$(STAGING_DIR)/lib/libbz2.a: $(BZIP2_DIR)/libbz2.a
+ cp -a $(BZIP2_DIR)/libbz2.a $(STAGING_DIR)/lib;
+ cp -a $(BZIP2_DIR)/bzlib.h $(STAGING_DIR)/include;
+ touch -c $(STAGING_DIR)/lib/libbz2.a
+
+#$(TARGET_DIR)/lib/libbz2.so.1.1.4: $(STAGING_DIR)/lib/libbz2.so.1.1.4
+# cp -a $(STAGING_DIR)/lib/libbz2.so* $(TARGET_DIR)/lib;
+# -$(STRIP) --strip-unneeded $(TARGET_DIR)/lib/libbz2.so*
+# touch -c $(TARGET_DIR)/lib/libbz2.so.1.1.4
+
+bzip2: uclibc $(STAGING_DIR)/lib/libbz2.a
+
+bzip2-clean:
+ -make -C $(BZIP2_DIR) clean
+
+bzip2-dirclean:
+ rm -rf $(BZIP2_DIR)
+
diff --git a/make/diffutils.mk b/make/diffutils.mk
new file mode 100644
index 000000000..daff147de
--- /dev/null
+++ b/make/diffutils.mk
@@ -0,0 +1,57 @@
+#############################################################
+#
+# diffutils
+#
+#############################################################
+DIFFUTILS_SOURCE:=diffutils-2.8.4.tar.gz
+DIFFUTILS_SITE:=ftp://alpha.gnu.org/gnu/diffutils/
+DIFFUTILS_CAT:=zcat
+DIFFUTILS_DIR:=$(BUILD_DIR)/diffutils-2.8.4
+DIFFUTILS_BINARY:=src/diff
+DIFFUTILS_TARGET_BINARY:=usr/bin/diff
+
+$(DL_DIR)/$(DIFFUTILS_SOURCE):
+ $(WGET) -P $(DL_DIR) $(DIFFUTILS_SITE)/$(DIFFUTILS_SOURCE)
+
+diffutils-source: $(DL_DIR)/$(DIFFUTILS_SOURCE)
+
+$(DIFFUTILS_DIR)/.unpacked: $(DL_DIR)/$(DIFFUTILS_SOURCE)
+ $(DIFFUTILS_CAT) $(DL_DIR)/$(DIFFUTILS_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ touch $(DIFFUTILS_DIR)/.unpacked
+
+$(DIFFUTILS_DIR)/.configured: $(DIFFUTILS_DIR)/.unpacked
+ (cd $(DIFFUTILS_DIR); rm -rf config.cache; \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --disable-nls \
+ );
+ touch $(DIFFUTILS_DIR)/.configured
+
+$(DIFFUTILS_DIR)/$(DIFFUTILS_BINARY): $(DIFFUTILS_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) -C $(DIFFUTILS_DIR)
+
+$(TARGET_DIR)/$(DIFFUTILS_TARGET_BINARY): $(DIFFUTILS_DIR)/$(DIFFUTILS_BINARY)
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(DIFFUTILS_DIR) install
+ rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
+ $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
+
+diffutils: uclibc $(TARGET_DIR)/$(DIFFUTILS_TARGET_BINARY)
+
+diffutils-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(DIFFUTILS_DIR) uninstall
+ -$(MAKE) -C $(DIFFUTILS_DIR) clean
+
+diffutils-dirclean:
+ rm -rf $(DIFFUTILS_DIR)
+
diff --git a/make/ed.mk b/make/ed.mk
new file mode 100644
index 000000000..323e9dc11
--- /dev/null
+++ b/make/ed.mk
@@ -0,0 +1,52 @@
+#############################################################
+#
+# ed
+#
+#############################################################
+ED_SOURCE:=ed_0.2.orig.tar.gz
+ED_PATCH:=ed_0.2-19.diff.gz
+ED_SITE:=http://ftp.debian.org/debian/pool/main/e/ed
+ED_CAT:=zcat
+ED_DIR:=$(BUILD_DIR)/ed-0.2
+ED_BINARY:=ed
+ED_TARGET_BINARY:=bin/ed
+
+$(DL_DIR)/$(ED_SOURCE):
+ $(WGET) -P $(DL_DIR) $(ED_SITE)/$(ED_SOURCE)
+
+$(DL_DIR)/$(ED_PATCH):
+ $(WGET) -P $(DL_DIR) $(ED_SITE)/$(ED_PATCH)
+
+ed-source: $(DL_DIR)/$(ED_SOURCE) $(DL_DIR)/$(ED_PATCH)
+
+$(ED_DIR)/.unpacked: $(DL_DIR)/$(ED_SOURCE) $(DL_DIR)/$(ED_PATCH)
+ $(ED_CAT) $(DL_DIR)/$(ED_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ $(SOURCE_DIR)/patch-kernel.sh $(ED_DIR) $(DL_DIR) $(ED_PATCH)
+ touch $(ED_DIR)/.unpacked
+
+$(ED_DIR)/.configured: $(ED_DIR)/.unpacked
+ (cd $(ED_DIR); rm -rf config.cache; \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --disable-nls \
+ );
+ touch $(ED_DIR)/.configured
+
+$(ED_DIR)/$(ED_BINARY): $(ED_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) -C $(ED_DIR)
+
+$(TARGET_DIR)/$(ED_TARGET_BINARY): $(ED_DIR)/$(ED_BINARY)
+ cp -a $(ED_DIR)/$(ED_BINARY) $(TARGET_DIR)/$(ED_TARGET_BINARY)
+
+ed: uclibc $(TARGET_DIR)/$(ED_TARGET_BINARY)
+
+ed-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(ED_DIR) uninstall
+ -$(MAKE) -C $(ED_DIR) clean
+
+ed-dirclean:
+ rm -rf $(ED_DIR)
+
diff --git a/make/file.mk b/make/file.mk
new file mode 100644
index 000000000..2d4c1d263
--- /dev/null
+++ b/make/file.mk
@@ -0,0 +1,58 @@
+#############################################################
+#
+# file
+#
+#############################################################
+FILE_SOURCE:=file-3.39.tar.gz
+FILE_SITE:=ftp://ftp.astron.com/pub/file
+FILE_DIR:=$(BUILD_DIR)/file-3.39
+FILE_CAT:=zcat
+FILE_BINARY:=file
+FILE_TARGET_BINARY:=usr/bin/file
+
+$(DL_DIR)/$(FILE_SOURCE):
+ $(WGET) -P $(DL_DIR) $(FILE_SITE)/$(FILE_SOURCE)
+
+file-source: $(DL_DIR)/$(FILE_SOURCE)
+
+$(FILE_DIR)/.unpacked: $(DL_DIR)/$(FILE_SOURCE)
+ $(FILE_CAT) $(DL_DIR)/$(FILE_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ touch $(FILE_DIR)/.unpacked
+
+$(FILE_DIR)/.configured: $(FILE_DIR)/.unpacked
+ (cd $(FILE_DIR); rm -rf config.cache; \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --datadir=/usr/share/misc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --disable-nls \
+ --enable-fsect-man5 \
+ );
+ touch $(FILE_DIR)/.configured
+
+$(FILE_DIR)/$(FILE_BINARY): $(FILE_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) -C $(FILE_DIR)
+
+$(TARGET_DIR)/$(FILE_TARGET_BINARY): $(FILE_DIR)/$(FILE_BINARY)
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(FILE_DIR) install
+ rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
+ $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
+
+file: uclibc $(TARGET_DIR)/$(FILE_TARGET_BINARY)
+
+file-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(FILE_DIR) uninstall
+ -$(MAKE) -C $(FILE_DIR) clean
+
+file-dirclean:
+ rm -rf $(FILE_DIR)
+
diff --git a/make/flex.mk b/make/flex.mk
new file mode 100644
index 000000000..d37a9f7fe
--- /dev/null
+++ b/make/flex.mk
@@ -0,0 +1,77 @@
+#############################################################
+#
+# flex
+#
+#############################################################
+FLEX_SOURCE:=flex_2.5.4a.orig.tar.gz
+FLEX_PATCH:=flex_2.5.4a-27.diff.gz
+FLEX_SITE:=http://ftp.debian.org/debian/pool/main/f/flex
+FLEX_DIR:=$(BUILD_DIR)/flex-2.5.4
+FLEX_CAT:=zcat
+FLEX_BINARY:=flex
+FLEX_TARGET_BINARY:=usr/bin/flex
+
+$(DL_DIR)/$(FLEX_SOURCE):
+ $(WGET) -P $(DL_DIR) $(FLEX_SITE)/$(FLEX_SOURCE)
+
+$(DL_DIR)/$(FLEX_PATCH):
+ $(WGET) -P $(DL_DIR) $(FLEX_SITE)/$(FLEX_PATCH)
+
+ed-source: $(DL_DIR)/$(FLEX_SOURCE) $(DL_DIR)/$(FLEX_PATCH)
+
+$(FLEX_DIR)/.unpacked: $(DL_DIR)/$(FLEX_SOURCE) $(DL_DIR)/$(FLEX_PATCH)
+ $(FLEX_CAT) $(DL_DIR)/$(FLEX_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ #$(SOURCE_DIR)/patch-kernel.sh $(FLEX_DIR) $(DL_DIR) $(FLEX_PATCH)
+ touch $(FLEX_DIR)/.unpacked
+
+$(FLEX_DIR)/.configured: $(FLEX_DIR)/.unpacked
+ (cd $(FLEX_DIR); autoconf; rm -rf config.cache; \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --disable-nls \
+ );
+ touch $(FLEX_DIR)/.configured
+
+$(FLEX_DIR)/$(FLEX_BINARY): $(FLEX_DIR)/.configured
+ $(MAKE) -C $(FLEX_DIR)
+
+$(TARGET_DIR)/$(FLEX_TARGET_BINARY): $(FLEX_DIR)/$(FLEX_BINARY)
+ $(MAKE) \
+ prefix=$(TARGET_DIR)/usr \
+ exec_prefix=$(TARGET_DIR)/usr \
+ bindir=$(TARGET_DIR)/usr/bin \
+ sbindir=$(TARGET_DIR)/usr/sbin \
+ libexecdir=$(TARGET_DIR)/usr/lib \
+ datadir=$(TARGET_DIR)/usr/share \
+ sysconfdir=$(TARGET_DIR)/etc \
+ sharedstatedir=$(TARGET_DIR)/usr/com \
+ localstatedir=$(TARGET_DIR)/var \
+ libdir=$(TARGET_DIR)/usr/lib \
+ infodir=$(TARGET_DIR)/usr/info \
+ mandir=$(TARGET_DIR)/usr/man \
+ includedir=$(TARGET_DIR)/usr/include \
+ -C $(FLEX_DIR) install;
+ rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
+ $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
+ (cd $(TARGET_DIR)/usr/bin; ln -s flex lex)
+
+flex: uclibc $(TARGET_DIR)/$(FLEX_TARGET_BINARY)
+
+flex-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) -C $(FLEX_DIR) uninstall
+ -$(MAKE) -C $(FLEX_DIR) clean
+
+flex-dirclean:
+ rm -rf $(FLEX_DIR)
+
diff --git a/make/patch.mk b/make/patch.mk
new file mode 100644
index 000000000..4f7329f6b
--- /dev/null
+++ b/make/patch.mk
@@ -0,0 +1,55 @@
+#############################################################
+#
+# patch
+#
+#############################################################
+GNUPATCH_SOURCE:=patch-2.5.4.tar.gz
+GNUPATCH_SITE:=ftp://ftp.gnu.org/pub/gnu/patch
+GNUPATCH_CAT:=zcat
+GNUPATCH_DIR:=$(BUILD_DIR)/patch-2.5.4
+GNUPATCH_BINARY:=patch
+GNUPATCH_TARGET_BINARY:=usr/bin/patch
+
+$(DL_DIR)/$(GNUPATCH_SOURCE):
+ $(WGET) -P $(DL_DIR) $(GNUPATCH_SITE)/$(GNUPATCH_SOURCE)
+
+patch-source: $(DL_DIR)/$(GNUPATCH_SOURCE)
+
+$(GNUPATCH_DIR)/.unpacked: $(DL_DIR)/$(GNUPATCH_SOURCE)
+ $(GNUPATCH_CAT) $(DL_DIR)/$(GNUPATCH_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ touch $(GNUPATCH_DIR)/.unpacked
+
+$(GNUPATCH_DIR)/.configured: $(GNUPATCH_DIR)/.unpacked
+ (cd $(GNUPATCH_DIR); rm -rf config.cache; \
+ PATH=$(TARGET_PATH) CC=$(TARGET_CC) \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --disable-nls \
+ );
+ touch $(GNUPATCH_DIR)/.configured
+
+$(GNUPATCH_DIR)/$(GNUPATCH_BINARY): $(GNUPATCH_DIR)/.configured
+ $(MAKE) CC=$(TARGET_CC) -C $(GNUPATCH_DIR)
+
+$(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY): $(GNUPATCH_DIR)/$(GNUPATCH_BINARY)
+ cp -a $(GNUPATCH_DIR)/$(GNUPATCH_BINARY) $(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY)
+
+patch: uclibc $(TARGET_DIR)/$(GNUPATCH_TARGET_BINARY)
+
+patch-clean:
+ $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(GNUPATCH_DIR) uninstall
+ -$(MAKE) -C $(GNUPATCH_DIR) clean
+
+patch-dirclean:
+ rm -rf $(GNUPATCH_DIR)
+