
Former-commit-id: 5ccce0dd66b202b6e0178cc3cff2e4f9a70b736f Former-commit-id: 3616fa85a3b74c0acc493e50224746adc8cf3c31
33 lines
985 B
Makefile
33 lines
985 B
Makefile
#
|
|
# 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=dump1090
|
|
|
|
ifdef PREFIX
|
|
BINDIR=$(PREFIX)/bin
|
|
SHAREDIR=$(PREFIX)/share/$(PROGNAME)
|
|
EXTRACFLAGS=-DHTMLPATH=\"$(SHAREDIR)\"
|
|
endif
|
|
|
|
ifdef RPI
|
|
CFLAGS=-O2 -g -Wall -W `pkg-config --cflags librtlsdr` -std=c99
|
|
LIBS=`pkg-config --libs librtlsdr` -lpthread -lm `sdl-config --libs` -lSDL -lSDL_ttf -lSDL_gfx -lwiringPi -DRPI
|
|
CC=gcc
|
|
else
|
|
CFLAGS=-O2 -g -Wall -W `pkg-config --cflags librtlsdr`
|
|
LIBS=`pkg-config --libs librtlsdr` -lpthread -lm `sdl-config --libs` -lSDL -lSDL_ttf -lSDL_gfx
|
|
CC=gcc
|
|
endif
|
|
|
|
all: view1090
|
|
|
|
%.o: %.c
|
|
$(CC) $(CFLAGS) $(EXTRACFLAGS) -c $<
|
|
|
|
view1090: view1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o input.o draw.o font.o init.o maps.o
|
|
$(CC) -g -o view1090 view1090.o anet.o interactive.o mode_ac.o mode_s.o net_io.o input.o draw.o font.o init.o maps.o $(LIBS) $(LDFLAGS)
|
|
|
|
clean:
|
|
rm -f *.o view1090
|