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 trxcon gsmmap gprsdecode 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 trxcon
: host
/trxcon
/trxcon
64 host
/trxcon
/configure
: host
/trxcon
/configure.ac
65 cd host
/trxcon
&& autoreconf
-i
67 host
/trxcon
/Makefile
: host
/trxcon
/configure
68 cd host
/trxcon
&& .
/configure
$(HOST_CONFARGS
)
70 host
/trxcon
/trxcon
: host
/trxcon
/Makefile
75 gsmmap
: host
/gsmmap
/gsmmap
77 host
/gsmmap
/configure
: host
/gsmmap
/configure.ac
78 cd host
/gsmmap
&& autoreconf
-i
80 host
/gsmmap
/Makefile
: host
/gsmmap
/configure
81 cd host
/gsmmap
&& .
/configure
$(HOST_CONFARGS
)
83 host
/gsmmap
/gsmmap
: host
/gsmmap
/Makefile
88 layer23
: host
/layer23
/layer23
90 host
/layer23
/configure
: host
/layer23
/configure.ac
91 cd host
/layer23
&& autoreconf
-i
93 host
/layer23
/Makefile
: host
/layer23
/configure
94 cd host
/layer23
&& .
/configure
$(HOST_CONFARGS
)
96 host
/layer23
/layer23
: host
/layer23
/Makefile
100 gprsdecode
: host
/gprsdecode
/gprsdecode
102 host
/gprsdecode
/configure
: host
/gprsdecode
/configure.ac
103 cd host
/gprsdecode
&& autoreconf
-i
105 host
/gprsdecode
/Makefile
: host
/gprsdecode
/configure
106 cd host
/gprsdecode
&& .
/configure
$(HOST_CONFARGS
)
108 host
/gprsdecode
/gprsdecode
: host
/gprsdecode
/Makefile
109 make
-C host
/gprsdecode
112 firmware
: libosmocore-target
113 make
-C target
/firmware CROSS_COMPILE
=$(CROSS_TOOL_PREFIX
)
116 mtk-firmware
: libosmocore-target
117 make
-C target
/firmware
-f Makefile.mtk CROSS_COMPILE
=$(CROSS_TOOL_PREFIX
)
121 make
-C shared
/libosmocore
/build-target
$@
122 make
-C host
/layer23
$@
123 make
-C host
/osmocon
$@
124 make
-C host
/gsmmap
$@
125 make
-C host
/gprsdecode
$@
126 make
-C host
/virt_phy
$@
127 make
-C host
/trxcon
$@
128 make
-C target
/firmware
$@
129 make
-C target
/firmware
-f Makefile.mtk
$@
132 rm -rf shared
/libosmocore
/build-target
133 make
-C host
/layer23
$@
134 make
-C host
/osmocon
$@
135 make
-C host
/gsmmap
$@
136 make
-C host
/gprsdecode
$@
137 make
-C host
/virt_phy
$@
138 make
-C host
/trxcon
$@
139 # 'firmware' also handles 'mtk-firmware'
140 make
-C target
/firmware
$@