-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
41 lines (28 loc) · 1.07 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
CC = g++
CFLAGS = -Wall -g -flto
INCLUDES = -I./SX1280Lib/ -I./mbed_port/ -I./RFFC5072Lib/
LFLAGS =
LIBS = -lsoc -lpthread
SRCS = main.cpp
SRCS += ./mbed_port/drivers/DigitalIn.cpp ./mbed_port/drivers/DigitalOut.cpp ./mbed_port/drivers/DigitalInOut.cpp ./mbed_port/drivers/InterruptIn.cpp ./mbed_port/drivers/SPI.cpp
SRCS += ./SX1280Lib/sx1280.cpp ./SX1280Lib/sx1280-hal.cpp ./mbed_port/mbed.cpp ./mbed_port/drivers/gpio_irq_api.c
SRCS += ./RFFC5072Lib/rffc5071_spi.c ./RFFC5072Lib/spi_bus.c ./RFFC5072Lib/rffc5071.c ./RFFC5072Lib/gpio_RFFC.c
OBJS = $(SRCS:.c=.o)
MAIN = chat
.PHONY: depend clean
all: $(MAIN)
@echo Program has been compiled
static: CFLAGS += -static
static: all
$(MAIN): $(OBJS)
$(CC) $(CFLAGS) $(INCLUDES) -o $(MAIN) $(OBJS) $(LFLAGS) $(LIBS)
strip $(MAIN)
.c.o:
$(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
clean:
rm -rf $(MAIN) *.o RFFC5072Lib/*.o SX1280Lib/*.o
%clean: %
$(MAKE) -C $< -f $(PWD)/Makefile clean_curdir
depend: $(SRCS)
makedepend $(INCLUDES) $^
# DO NOT DELETE THIS LINE -- make depend needs it