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-elf
6 # this is the prefix of your cross-toolchain programs
7 CROSS_TOOL_PREFIX=arm-elf-
10 OSMOCORE_CONFIGURE_ENV= LIBOSMOCORE_LIBS=$(TOPDIR)/shared/libosmocore/build-host/src/.libs/libosmocore.a \
11 LIBOSMOCORE_CFLAGS=-I$(TOPDIR)/shared/libosmocore/include
13 all: libosmocore-host libosmocore-target layer23 osmocon firmware
15 libosmocore-host: shared/libosmocore/build-host/src/.libs/libosmocore.la
17 shared/libosmocore/build-host:
20 shared/libosmocore/configure: shared/libosmocore/configure.in
21 cd shared/libosmocore && autoreconf -i
23 shared/libosmocore/build-host/Makefile: shared/libosmocore/configure shared/libosmocore/build-host
24 cd shared/libosmocore/build-host && ../configure
26 shared/libosmocore/build-host/src/.libs/libosmocore.la: shared/libosmocore/build-host/Makefile
27 cd shared/libosmocore/build-host && make
30 libosmocore-target: shared/libosmocore/build-target/src/.libs/libosmocore.a
32 shared/libosmocore/build-target:
35 shared/libosmocore/build-target/Makefile: shared/libosmocore/configure shared/libosmocore/build-target
36 cd shared/libosmocore/build-target && ../configure \
37 --host=arm-elf-linux --disable-shared --disable-talloc --disable-tests \
38 CC="$(CROSS_TOOL_PREFIX)gcc" CFLAGS="-Os -ffunction-sections -I../../../../target/firmware/include"
40 shared/libosmocore/build-target/src/.libs/libosmocore.a: shared/libosmocore/build-target/Makefile
41 cd shared/libosmocore/build-target && make
45 osmocon: host/osmocon/osmocon
47 host/osmocon/configure: host/osmocon/configure.ac
48 cd host/osmocon && autoreconf -i
50 host/osmocon/Makefile: host/osmocon/configure
51 cd host/osmocon && $(OSMOCORE_CONFIGURE_ENV) ./configure
53 host/osmocon/osmocon: host/osmocon/Makefile libosmocore-host
58 layer23: host/layer23/layer23
60 host/layer23/configure: host/layer23/configure.ac
61 cd host/layer23 && autoreconf -i
63 host/layer23/Makefile: host/layer23/configure
64 cd host/layer23 && $(OSMOCORE_CONFIGURE_ENV) ./configure
66 host/layer23/layer23: host/layer23/Makefile libosmocore-host
71 firmware: libosmocore-target
72 make -C target/firmware CROSS_COMPILE=$(CROSS_TOOL_PREFIX)
76 make -C shared/libosmocore/build-host $@
77 make -C shared/libosmocore/build-target $@
78 make -C host/layer23 $@
79 make -C host/osmocon $@
80 make -C target/firmware $@
83 rm -rf shared/libosmocore/build-host
84 rm -rf shared/libosmocore/build-target
85 make -C host/layer23 $@
86 make -C host/osmocon $@
87 make -C target/firmware $@