forked from drexjj/sbitx
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (30 loc) · 853 Bytes
/
Makefile
File metadata and controls
35 lines (30 loc) · 853 Bytes
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
TARGET = sbitx
SOURCES = $(wildcard src/*.c)
OBJECTS = $(SOURCES:.c=.o)
FFTOBJ = ft8_lib/.build/fft/kiss_fft.o ft8_lib/.build/fft/kiss_fftr.o
HEADERS = $(wildcard src/*.h)
CFLAGS = `pkg-config --cflags gtk+-3.0` -I.
LIBS = -lwiringPi -lasound -lm -lfftw3 -lfftw3f -pthread -lsqlite3 -lnsl -lrt ft8_lib/libft8.a `pkg-config --libs gtk+-3.0`
ifdef SBITX_DEBUG
CFLAGS += -ggdb3 -fsanitize=address
LIBS += -fsanitize=address -static-libasan
endif
CC = gcc
LINK = gcc
STRIP = strip
$(TARGET): $(OBJECTS) ft8_lib/libft8.a
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(FFTOBJ) $(LIBPATH) $(LIBS)
.c.o: $(HEADERS)
$(CC) -c $(CFLAGS) $(DEBUGFLAGS) $(INCPATH) -o $@ $<
ft8_lib/libft8.a:
ifdef SBITX_DEBUG
$(MAKE) FT8_DEBUG=1 -C ft8_lib
else
$(MAKE) -C ft8_lib
endif
clean:
-rm -f $(OBJECTS)
-rm -f *~ core *.core
-rm -f $(TARGET)
test:
echo $(OBJECTS)