forked from rad1o/hackrf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (32 loc) · 910 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
default: lib hackrf-usb
all: lib hackrf-usb hackrf-tools
force: clean all
ifeq ($(MAKECMDGOALS),rebuild)
FORCE=FORCE
rebuild: all
endif
firmware/libopencm3/README:
git submodule init
firmware/libopencm3/lib/libopencm3_lpc43xx.a: $(FORCE)
git submodule update
$(MAKE) -C firmware/libopencm3
lib: firmware/libopencm3/README firmware/libopencm3/lib/libopencm3_lpc43xx.a
FDIR=firmware/hackrf_usb/build
hackrf-usb: $(FDIR)/hackrf_usb.bin
$(FDIR)/hackrf_usb.bin: $(FDIR) $(FDIR)/Makefile $(FORCE)
$(MAKE) -C $(FDIR)
$(FDIR)/Makefile:
cd $(FDIR) && cmake -DBOARD=RAD1O -DRUN_FROM=RAM ..
$(FDIR):
mkdir $(FDIR)
TDIR=host/build
$(TDIR):
mkdir $(TDIR)
hackrf-tools: $(TDIR) $(TDIR)/hackrf-tools/src/hackrf_info
$(TDIR)/hackrf-tools/src/hackrf_info: $(FORCE)
cd $(TDIR) && cmake .. && $(MAKE)
hack-clean:
$(RM) -r $(FDIR) $(TDIR)
clean: hack-clean
$(MAKE) -C firmware/libopencm3 clean
FORCE: