2 # this is not really used as we don't do 'make install'. You can still specify
3 # it in case you _want_ to manually 'make install' the target libosmocore.
4 CROSS_INST_PREFIX ?
= /usr
/local
/stow
/osmocom-bb
/arm-2010.09
6 # this is the host tuple of your cross-toolchain
7 CROSS_HOST ?
= $(shell which arm-elf-gcc
>/dev
/null
2>&1 && echo arm-elf || echo arm-none-eabi
)
9 # this is the prefix of your cross-toolchain programs
10 CROSS_TOOL_PREFIX
=$(CROSS_HOST
)-
14 all: libosmocore-target nofirmware firmware mtk-firmware
16 nofirmware
: layer23 osmocon gsmmap virtphy
18 libosmocore-target
: shared
/libosmocore
/build-target
/src
/.libs
/libosmocore.a
20 shared
/libosmocore
/configure
: shared
/libosmocore
/configure.ac
21 cd shared
/libosmocore
&& autoreconf
-fi
23 shared
/libosmocore
/build-target
:
26 shared
/libosmocore
/build-target
/Makefile
: shared
/libosmocore
/configure shared
/libosmocore
/build-target
27 cd shared
/libosmocore
/build-target
&& ..
/configure \
28 --host
=$(CROSS_HOST
) --enable-embedded
--disable-shared \
29 --disable-tests ac_cv_header_sys_select_h
=no \
30 --disable-tests ac_cv_header_sys_socket_h
=no \
31 CFLAGS
="-Os -ffunction-sections -I$(TOPDIR)/target/firmware/include -nostartfiles -nodefaultlibs"
33 shared
/libosmocore
/build-target
/src
/.libs
/libosmocore.a
: shared
/libosmocore
/build-target
/Makefile
34 cd shared
/libosmocore
/build-target
&& make
38 osmocon
: host
/osmocon
/osmocon
40 host
/osmocon
/configure
: host
/osmocon
/configure.ac
41 cd host
/osmocon
&& autoreconf
-i
43 host
/osmocon
/Makefile
: host
/osmocon
/configure
44 cd host
/osmocon
&& .
/configure
$(HOST_CONFARGS
)
46 host
/osmocon
/osmocon
: host
/osmocon
/Makefile
50 virtphy
: host
/virt_phy
/virtphy
52 host
/virt_phy
/configure
: host
/virt_phy
/configure.ac
53 cd host
/virt_phy
&& autoreconf
-i
55 host
/virt_phy
/Makefile
: host
/virt_phy
/configure
56 cd host
/virt_phy
&& .
/configure
$(HOST_CONFARGS
)
58 host
/virt_phy
/virtphy
: host
/virt_phy
/Makefile
62 gsmmap
: host
/gsmmap
/gsmmap
64 host
/gsmmap
/configure
: host
/gsmmap
/configure.ac
65 cd host
/gsmmap
&& autoreconf
-i
67 host
/gsmmap
/Makefile
: host
/gsmmap
/configure
68 cd host
/gsmmap
&& .
/configure
$(HOST_CONFARGS
)
70 host
/gsmmap
/gsmmap
: host
/gsmmap
/Makefile
75 layer23
: host
/layer23
/layer23
77 host
/layer23
/configure
: host
/layer23
/configure.ac
78 cd host
/layer23
&& autoreconf
-i
80 host
/layer23
/Makefile
: host
/layer23
/configure
81 cd host
/layer23
&& .
/configure
$(HOST_CONFARGS
)
83 host
/layer23
/layer23
: host
/layer23
/Makefile
88 firmware
: libosmocore-target
89 make
-C target
/firmware CROSS_COMPILE
=$(CROSS_TOOL_PREFIX
)
92 mtk-firmware
: libosmocore-target
93 make
-C target
/firmware
-f Makefile.mtk CROSS_COMPILE
=$(CROSS_TOOL_PREFIX
)
97 make
-C shared
/libosmocore
/build-target
$@
98 make
-C host
/layer23
$@
99 make
-C host
/osmocon
$@
100 make
-C host
/gsmmap
$@
101 make
-C host
/virt_phy
$@
102 make
-C target
/firmware
$@
103 make
-C target
/firmware
-f Makefile.mtk
$@
106 rm -rf shared
/libosmocore
/build-target
107 make
-C host
/layer23
$@
108 make
-C host
/osmocon
$@
109 make
-C host
/gsmmap
$@
110 make
-C host
/virt_phy
$@
111 # 'firmware' also handles 'mtk-firmware'
112 make
-C target
/firmware
$@