viz1090/sdl1090/Makefile
nathan d21e4cf56a pi compiler fixes
Former-commit-id: 805e1fa2ccf972b38e72c43ca3812ab35c11075a
Former-commit-id: f74d5c1768d2390c25defe43b9c10d644bfb1080
2017-09-05 10:57:02 +00:00

33 lines
1,000 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 -DRPI -D_GNU_SOURCE
LIBS=`pkg-config --libs librtlsdr` -lpthread -lm `sdl-config --libs` -lSDL -lSDL_ttf -lSDL_gfx -lwiringPi
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