Host driver/HAL to build a LoRa Picocell Gateway which communicates through USB with a concentrator board based on Semtech SX1308 multi-channel modem and SX1257/SX1255 RF transceivers.

Revision:
0:102b50f941d0
diff -r 000000000000 -r 102b50f941d0 util_tx_test/Makefile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/util_tx_test/Makefile	Wed Apr 11 14:38:42 2018 +0000
@@ -0,0 +1,67 @@
+### Application-specific constants
+
+APP_NAME := util_tx_test
+
+### Environment constants 
+
+LGW_PATH ?= ../libloragw
+ARCH ?=
+CROSS_COMPILE ?=
+
+### External constant definitions
+# must get library build option to know if mpsse must be linked or not
+
+include $(LGW_PATH)/library.cfg
+
+### Constant symbols
+
+CC := $(CROSS_COMPILE)gcc
+AR := $(CROSS_COMPILE)ar
+
+CFLAGS=-O2 -Wall -Wextra -std=c99 -Iinc -I.
+
+OBJDIR = obj
+
+### Constants for LoRa concentrator HAL library
+# List the library sub-modules that are used by the application
+
+LGW_INC = $(LGW_PATH)/inc/config.h
+LGW_INC += $(LGW_PATH)/inc/loragw_hal.h
+LGW_INC += $(LGW_PATH)/inc/loragw_aux.h
+
+### Linking options
+
+LIBS := -lloragw -lrt -lm
+
+### General build targets
+
+all: $(APP_NAME)
+
+clean:
+	rm -f $(OBJDIR)/*.o
+	rm -f $(APP_NAME)
+
+### HAL library (do no force multiple library rebuild even with 'make -B')
+
+$(LGW_PATH)/inc/config.h:
+	@if test ! -f $@; then \
+	$(MAKE) all -C $(LGW_PATH); \
+	fi
+
+$(LGW_PATH)/libloragw.a: $(LGW_INC)
+	@if test ! -f $@; then \
+	$(MAKE) all -C $(LGW_PATH); \
+	fi
+
+### Main program compilation and assembly
+
+$(OBJDIR):
+	mkdir -p $(OBJDIR)
+
+$(OBJDIR)/$(APP_NAME).o: src/$(APP_NAME).c $(LGW_INC) | $(OBJDIR)
+	$(CC) -c $(CFLAGS) -I$(LGW_PATH)/inc $< -o $@
+
+$(APP_NAME): $(OBJDIR)/$(APP_NAME).o $(LGW_PATH)/libloragw.a
+	$(CC) -L$(LGW_PATH) $< -o $@ $(LIBS)
+
+### EOF