Merge commit '430be849945688ae107b079db1e216329b1a1f06'
[osmocom-bb.git] / src / Makefile
index 1b6f2f7..7dba3bd 100644 (file)
@@ -17,7 +17,7 @@ OSMOCORE_CONFIGURE_ENV= LIBOSMOCORE_LIBS=$(TOPDIR)/shared/libosmocore/build-host
                        LIBOSMOVTY_CFLAGS=-I$(TOPDIR)/shared/libosmocore/include \
                        LIBOSMOGSM_CFLAGS=-I$(TOPDIR)/shared/libosmocore/include
 
-all: libosmocore-target nofirmware firmware
+all: libosmocore-target nofirmware firmware mtk-firmware
 nofirmware: libosmocore-host layer23 osmocon gsmmap
 
 libosmocore-host: shared/libosmocore/build-host/src/.libs/libosmocore.la
@@ -25,7 +25,7 @@ libosmocore-host: shared/libosmocore/build-host/src/.libs/libosmocore.la
 shared/libosmocore/build-host:
        mkdir $@
 
-shared/libosmocore/configure: shared/libosmocore/configure.in
+shared/libosmocore/configure: shared/libosmocore/configure.ac
        cd shared/libosmocore && autoreconf -i
 
 shared/libosmocore/build-host/Makefile: shared/libosmocore/configure shared/libosmocore/build-host
@@ -43,7 +43,9 @@ shared/libosmocore/build-target:
 shared/libosmocore/build-target/Makefile: shared/libosmocore/configure shared/libosmocore/build-target
        cd shared/libosmocore/build-target && ../configure \
                        --host=$(CROSS_HOST) --disable-vty --enable-panic-infloop \
-                       --disable-shared --disable-talloc --disable-tests ac_cv_header_sys_select_h=no \
+                       --disable-shared --disable-talloc \
+                       --disable-tests ac_cv_header_sys_select_h=no \
+                       --disable-tests ac_cv_header_sys_socket_h=no \
                CFLAGS="-Os -ffunction-sections -I$(TOPDIR)/target/firmware/include -nostartfiles -nodefaultlibs"
 
 shared/libosmocore/build-target/src/.libs/libosmocore.a: shared/libosmocore/build-target/Makefile
@@ -93,6 +95,10 @@ host/layer23/layer23: host/layer23/Makefile libosmocore-host
 firmware: libosmocore-target
        make -C target/firmware CROSS_COMPILE=$(CROSS_TOOL_PREFIX)
 
+.PHONY: mtk-firmware
+mtk-firmware: libosmocore-target
+       make -C target/firmware -f Makefile.mtk CROSS_COMPILE=$(CROSS_TOOL_PREFIX)
+
 
 clean:
        make -C shared/libosmocore/build-host $@
@@ -100,10 +106,12 @@ clean:
        make -C host/layer23 $@
        make -C host/osmocon $@
        make -C target/firmware $@
+       make -C target/firmware -f Makefile.mtk $@
 
 distclean:
        rm -rf shared/libosmocore/build-host
        rm -rf shared/libosmocore/build-target
        make -C host/layer23 $@
        make -C host/osmocon $@
+# 'firmware' also handles 'mtk-firmware'
        make -C target/firmware $@