Skip to content

Commit

Permalink
Build with a Makefile
Browse files Browse the repository at this point in the history
Remove custom build script and use a Makefile

Signed-off-by: Nuno Goncalves <[email protected]>
  • Loading branch information
nunojpg committed Jul 12, 2015
1 parent c6cf5e7 commit 2948205
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 28 deletions.
26 changes: 26 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
CFLAGS?=-O2 -g -Wall -W $(shell pkg-config --cflags librtlsdr)
CFLAGS+= -I./aisdecoder -I ./aisdecoder/lib
LDFLAGS+=$(shell pkg-config --libs librtlsdr) -lpthread -lm
CC?=gcc
SOURCES= \
rtl_ais.c convenience.c \
./aisdecoder/aisdecoder.c \
./aisdecoder/sounddecoder.c \
./aisdecoder/lib/receiver.c \
./aisdecoder/lib/protodec.c \
./aisdecoder/lib/hmalloc.c \
./aisdecoder/lib/filter.c

OBJECTS=$(SOURCES:.c=.o)
EXECUTABLE=rtl_ais

all: $(SOURCES) $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
$(CC) $(OBJECTS) -o $@ $(LDFLAGS)

.c.o:
$(CC) -c $< -o $@ $(CFLAGS)

clean:
rm -f $(OBJECTS) $(EXECUTABLE)
28 changes: 0 additions & 28 deletions build.sh

This file was deleted.

0 comments on commit 2948205

Please sign in to comment.