-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
43 lines (32 loc) · 1.28 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
# libiio - Library for interfacing industrial I/O (IIO) devices
#
# Copyright (C) 2014 Analog Devices, Inc.
# Author: Paul Cercueil <paul.cercueil@analog.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
DEPENDENCIES := glib-2.0 gthread-2.0
TARGETS := ad9361-capture
CFLAGS = -Wall
CFLAGS += `pkg-config --cflags $(DEPENDENCIES)`
LDFLAGS = `pkg-config --libs $(DEPENDENCIES)`
.PHONY: all clean
all: $(TARGETS)
#gcc -Wall -D_REENTRANT -D_POSIX_TIMERS timer.c -o timer -lrt
timer.o : timer.c
$(CC) timer.c -c $(CFLAGS) -D_REENTRANT -D_POSIX_TIMERS
rxfifo_reset.o : rxfifo_reset.c
$(CC) rxfifo_reset.c -c $(CFLAGS)
ad9361-capture : ad9361-capture.o rxfifo_reset.o timer.o
$(CC) -o $@ $^ $(LDFLAGS) -liio -lpcap -lpthread -lrt
clean:
rm -f $(TARGETS) $(TARGETS:%=%.o) rxfifo_reset.o timer.o
install:
cp $(TARGETS) ./../../gao