-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (40 loc) · 1.08 KB
/
Makefile
File metadata and controls
76 lines (40 loc) · 1.08 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
################################################################
#
# Simple Makefile for SdrLib
#
################################################################
CC = gcc -arch x86_64
CFLAGS = -g -O2 -Wall
INC = -I. -Isrc
LDFLAGS = -L. -Lobj -lsdr -lportaudio -lfftw3 -lpthread -lm
vpath %.c src
SRC = \
sdrlib.c \
audio.c \
demod.c \
device.c \
fft.c \
filter.c \
impl.c \
private.c \
util.c
OBJ = $(patsubst %.c,obj/%.o,$(SRC))
DEVICES = device/device-rtl.so
all : testme $(DEVICES)
testme: test/testme.c obj/libsdr.a
$(CC) $(CFLAGS) $(INC) test/testme.c $(LDFLAGS) -o $@
$(OBJ) : | obj
obj :
@mkdir -p $@
obj/libsdr.a : $(OBJ)
$(AR) rv $@ $(OBJ)
obj/%.o : %.c
$(CC) $(CFLAGS) $(INC) -c $< -o $@
clean:
$(RM) testme
$(RM) -r obj device/*
################################################################
# DEVICES
################################################################
device/device-rtl.so: devicesrc/device-rtl.c
$(CC) -shared $(CFLAGS) $(INC) $< -o $@ -lrtlsdr