summaryrefslogtreecommitdiff
path: root/loragw_hal/Makefile
diff options
context:
space:
mode:
authorSylvain Miermont <smiermont@semtech.com>2013-08-08 15:49:31 +0200
committerSylvain Miermont <smiermont@semtech.com>2013-10-23 11:03:07 +0200
commitddac0aa483dd5f7bca31b0c042949eca370a8fdc (patch)
tree339b16655dbb9b6cca0e972454a8591256330900 /loragw_hal/Makefile
parente588fccf2b13065c25c95c70be191614cd23b005 (diff)
downloadlora_gateway-ddac0aa483dd5f7bca31b0c042949eca370a8fdc.tar.gz
lora_gateway-ddac0aa483dd5f7bca31b0c042949eca370a8fdc.tar.bz2
lora_gateway-ddac0aa483dd5f7bca31b0c042949eca370a8fdc.zip
Beta 3v1.b3
- modified 'native' SPI module to align with the way resource pointers are managed in 'ftdi' variant (void pointers) - better check of channel frequency + bandwidth vs. authorized band - improved Makefile
Diffstat (limited to 'loragw_hal/Makefile')
-rw-r--r--loragw_hal/Makefile30
1 files changed, 18 insertions, 12 deletions
diff --git a/loragw_hal/Makefile b/loragw_hal/Makefile
index 94d23b2..0712c25 100644
--- a/loragw_hal/Makefile
+++ b/loragw_hal/Makefile
@@ -1,35 +1,41 @@
+CC=gcc
+CFLAGS=-O2 -Iinc
+C99FLAGS=-O2 -std=c99 -Iinc
+LDFLAGS=-lrt
+
+all: test_loragw_spi test_loragw_reg test_loragw_hal
+
clean:
rm -f test_*
rm -f obj/*.o
-all: test_loragw_spi test_loragw_reg test_loragw_hal
-
test_loragw_spi: obj/test_loragw_spi.o obj/loragw_spi.o
- gcc obj/test_loragw_spi.o obj/loragw_spi.o -o test_loragw_spi
+ $(CC) obj/test_loragw_spi.o obj/loragw_spi.o -o test_loragw_spi $(LDFLAGS)
test_loragw_reg: obj/test_loragw_reg.o obj/loragw_reg.o obj/loragw_spi.o
- gcc obj/test_loragw_reg.o obj/loragw_reg.o obj/loragw_spi.o -o test_loragw_reg
+ $(CC) obj/test_loragw_reg.o obj/loragw_reg.o obj/loragw_spi.o -o test_loragw_reg $(LDFLAGS)
test_loragw_hal: obj/test_loragw_hal.o obj/loragw_hal.o obj/loragw_reg.o obj/loragw_spi.o obj/loragw_aux.o
- gcc obj/test_loragw_hal.o obj/loragw_hal.o obj/loragw_reg.o obj/loragw_spi.o obj/loragw_aux.o -lrt -o test_loragw_hal
+ $(CC) obj/test_loragw_hal.o obj/loragw_hal.o obj/loragw_reg.o obj/loragw_spi.o obj/loragw_aux.o -o test_loragw_hal $(LDFLAGS)
obj/loragw_aux.o: src/loragw_aux.c inc/loragw_aux.h
- gcc -c -O2 -Iinc src/loragw_aux.c -o obj/loragw_aux.o
+ $(CC) -c $(CFLAGS) src/loragw_aux.c -o obj/loragw_aux.o
obj/loragw_spi.o: src/loragw_spi.c inc/loragw_spi.h
- gcc -c -O2 -std=c99 -Iinc src/loragw_spi.c -o obj/loragw_spi.o
+ $(CC) -c $(C99FLAGS) src/loragw_spi.c -o obj/loragw_spi.o
obj/loragw_reg.o: src/loragw_reg.c inc/loragw_reg.h inc/loragw_spi.h
- gcc -c -O2 -std=c99 -Iinc src/loragw_reg.c -o obj/loragw_reg.o
+ $(CC) -c $(C99FLAGS) src/loragw_reg.c -o obj/loragw_reg.o
obj/loragw_hal.o: src/loragw_hal.c src/arb_fw.var src/agc_fw.var inc/loragw_hal.h inc/loragw_reg.h inc/loragw_spi.h inc/loragw_aux.h
- gcc -c -O2 -std=c99 -Iinc src/loragw_hal.c -o obj/loragw_hal.o
+ $(CC) -c $(C99FLAGS) src/loragw_hal.c -o obj/loragw_hal.o
obj/test_loragw_spi.o: test/test_loragw_spi.c inc/loragw_spi.h
- gcc -c -std=c99 -Iinc test/test_loragw_spi.c -o obj/test_loragw_spi.o
+ $(CC) -c $(C99FLAGS) -Iinc test/test_loragw_spi.c -o obj/test_loragw_spi.o
obj/test_loragw_reg.o: test/test_loragw_reg.c inc/loragw_reg.h
- gcc -c -std=c99 -Iinc test/test_loragw_reg.c -o obj/test_loragw_reg.o
+ $(CC) -c $(C99FLAGS) -Iinc test/test_loragw_reg.c -o obj/test_loragw_reg.o
obj/test_loragw_hal.o: test/test_loragw_hal.c inc/loragw_hal.h inc/loragw_aux.h
- gcc -c -std=c99 -Iinc test/test_loragw_hal.c -o obj/test_loragw_hal.o
+ $(CC) -c $(C99FLAGS) test/test_loragw_hal.c -o obj/test_loragw_hal.o
+