-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
31 lines (24 loc) · 892 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
#
# When building a package or installing otherwise in the system, make
# sure that the variable PREFIX is defined, e.g. make PREFIX=/usr/local
#
PROGNAME=airspy1090
ifdef PREFIX
BINDIR=$(PREFIX)/bin
SHAREDIR=$(PREFIX)/share/$(PROGNAME)
EXTRACFLAGS=-DHTMLPATH=\"$(SHAREDIR)\"
endif
ASMFLAGS=-al -march=armv7-a
CFLAGS=-O2 -mcpu=cortex-a53 -g -Wall -W `pkg-config --cflags libusb-1.0`
LIBS=`pkg-config --libs libusb-1.0` -lpthread -lm
ASM=as
CC=gcc
all: airspy1090
%.o: %.c
$(CC) $(CFLAGS) $(EXTRACFLAGS) -c $<
%.o: %.s
$(ASM) $(ASMFLAGS) $< -o $(@) > $^.lst
airspy1090: airspy1090.o airspy.o anet.o interactive.o mode_ac.o mode_s.o net_io.o demodulate.o detectModeS.o detectModeA.o decode.o
$(CC) -g -o airspy1090 airspy1090.o airspy.o anet.o interactive.o mode_ac.o mode_s.o net_io.o demodulate.o detectModeS.o detectModeA.o decode.o $(LIBS) $(LDFLAGS)
clean:
rm -f *.o airspy1090