forked from xaelsouth/rtl-wmbus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (23 loc) · 1009 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
RM=rm
MKDIR=mkdir
CC=gcc
STRIP=strip
OUTDIR=build
OUTFILE="$(OUTDIR)/rtl_wmbus"
CFLAGS=-Iinclude -std=gnu99
CFLAGS_WARNINGS=-Wall -W -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wfloat-equal -Winline -Wmain -Wmissing-noreturn -Wmissing-prototypes -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wstrict-prototypes -Wswitch -Wunreachable-code -Wunused -Wuninitialized
LIB=-lm
SRC=rtl_wmbus.c
all: $(OUTDIR) release
$(OUTDIR):
$(MKDIR) -p "$(OUTDIR)"
release: $(OUTDIR)
$(CC) -DNDEBUG -O3 $(CFLAGS) $(CFLAGS_WARNINGS) -o $(OUTFILE) $(SRC) $(LIB)
debug: $(OUTDIR)
$(CC) -DDEBUG -O0 -g3 -ggdb -p -pg $(CFLAGS) $(CFLAGS_WARNINGS) -o $(OUTFILE) $(SRC) $(LIB)
# Will build on Raspberry Pi 1 only
pi1:
$(CC) -DNDEBUG -O3 -march=armv6 -mtune=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp -ffast-math $(CFLAGS) $(CFLAGS_WARNINGS) -o $(OUTFILE) $(SRC) $(LIB)
rebuild: clean all
clean:
$(RM) -rf "$(OUTDIR)"