summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-07-27 03:55:28 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-07-27 04:12:19 (EDT)
commit8bdf7e50eae673ffc7370e52c525176ab04258ac (patch)
tree12fedb8fd0e16f5cacae0677995ede6804648d0d /build
parentd99325676d18ae090abc609e0e8fdbf01065f45f (diff)
Simplify build configuration; use static makefile.
* Look up the GNU system type in the build makefile using a to-be-written an opkhelper utility. * Remove the get_config_values function from the config script. * Use a static build makefile.
Diffstat (limited to 'build')
-rw-r--r--build56
1 files changed, 56 insertions, 0 deletions
diff --git a/build b/build
new file mode 100644
index 0000000..5e80c7a
--- /dev/null
+++ b/build
@@ -0,0 +1,56 @@
+#! /usr/bin/make -f
+
+CFLAGS = -g -O2
+
+configure: configure.stamp
+configure.stamp:
+ mkdir build
+ # Generate the main makefile.
+ # Use shared BFD and opcodes libraries for all utilities.
+ # Don't enable multilib (multiarch is better).
+ # Enable plugins.
+ # Don't expect to find Gettext.
+ cd build && \
+ target_arch_gnu=$$(oh-getarchitecture -t gnu $(PKG_TARGET_ARCH)) && \
+ CFLAGS='$(CFLAGS)' ../src/configure \
+ --prefix=/usr --with-sysroot=/ \
+ --program-transform-name='s&^&$(PKG_TARGET_ARCH)-&' \
+ --enable-shared --disable-multilib \
+ --enable-plugins --disable-nls \
+ --build=$(OH_BUILD_ARCH_GNU) --host=$(OH_HOST_ARCH_GNU) \
+ --target=$${target_arch_gnu}
+ # Generate all the individual program makefiles.
+ cd build && make configure-host
+ touch $@
+
+build: build.stamp
+build.stamp: configure
+ # Build BFD header files.
+ cd build/bfd && make headers
+ # Build ALL the things!
+ cd build && make CFLAGS='$(CFLAGS)'
+ touch $@
+
+install: install.stamp
+install.stamp: build
+ # Install everything.
+ cd build && \
+ make CFLAGS='$(CFLAGS)' prefix="$${PWD}/../dest" install
+ # Remove static library dependency metadata generated by libtool.
+ rm -f ../dest/usr/lib/*.la
+ touch $@
+
+binary-arch: install
+ oh-strip
+ oh-installfiles
+ oh-installdocs binutils
+ oh-gencontrol
+ oh-buildopk
+
+binary-indep: install
+ oh-installfiles
+ oh-installdocs binutils
+ oh-gencontrol
+ oh-buildopk
+
+binary: binary-arch binary-indep