diff options
author | Sylvain Miermont <smiermont@semtech.com> | 2014-03-28 16:58:48 +0100 |
---|---|---|
committer | Sylvain Miermont <smiermont@semtech.com> | 2014-03-28 16:58:48 +0100 |
commit | f991b0e35ad1bd3b999c70e68c518bae91bd36a6 (patch) | |
tree | 7e098ae53dc1401d88efa12de3bfc24ff405d88c /util_pkt_logger/Makefile | |
parent | 0e2b2cfa32767e516870a4e6a2ce0b6cce827910 (diff) | |
download | lora_gateway-f991b0e35ad1bd3b999c70e68c518bae91bd36a6.tar.gz lora_gateway-f991b0e35ad1bd3b999c70e68c518bae91bd36a6.tar.bz2 lora_gateway-f991b0e35ad1bd3b999c70e68c518bae91bd36a6.zip |
v1.3.0v1.3.0
- Added TX power management.
- Added full support for SX1301 reference board.
- Changed build system with configuration for multiple chip/radio/band support.
- SX125x bandwidth set to 1MHz by default (was 800 kHz).
- Solved warnings with 64b integer printf when compiling on x86_64.
- Renamed helper programs to reduce the concentrator vs. gateway confusion.
Diffstat (limited to 'util_pkt_logger/Makefile')
-rw-r--r-- | util_pkt_logger/Makefile | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/util_pkt_logger/Makefile b/util_pkt_logger/Makefile new file mode 100644 index 0000000..2c99dde --- /dev/null +++ b/util_pkt_logger/Makefile @@ -0,0 +1,82 @@ +### Application-specific constants + +APP_NAME := util_pkt_logger + +### Environment constants + +LGW_PATH := ../libloragw +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. + +### 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 + +### Linking options + +ifeq ($(CFG_SPI),native) + LIBS := -lloragw -lrt +else ifeq ($(CFG_SPI),ftdi) + LIBS := -lloragw -lrt -lmpsse +endif + +### General build targets + +all: $(APP_NAME) global_conf.json + +clean: + rm -f obj/*.o + rm -f $(APP_NAME) + find . -name global_conf.json -exec rm -i {} \; + +### HAL library + +$(LGW_PATH)/libloragw.a: $(LGW_INC) + $(MAKE) all -C $(LGW_PATH) + +### Sub-modules compilation + +obj/parson.o: src/parson.c inc/parson.h + $(CC) -c $(CFLAGS) $< -o $@ + +### Select the proper configuration JSON for the program + +ifeq ($(CFG_BAND),eu868) +global_conf.json: cfg/global_conf.eu868.json + cp $< $@ +else ifeq ($(CFG_BAND),us915) +global_conf.json: cfg/global_conf.us915.json + cp $< $@ +else ifeq ($(CFG_BAND),cn470) +global_conf.json: cfg/global_conf.cn470.json + cp $< $@ +else ifeq ($(CFG_BAND),eu433) +global_conf.json: cfg/global_conf.eu433.json + cp $< $@ +else +global_conf.json: cfg/global_conf.empty.json + cp $< $@ +endif + +### Main program compilation and assembly + +obj/$(APP_NAME).o: src/$(APP_NAME).c $(LGW_INC) inc/parson.h + $(CC) -c $(CFLAGS) -I$(LGW_PATH)/inc $< -o $@ + +$(APP_NAME): obj/$(APP_NAME).o $(LGW_PATH)/libloragw.a obj/parson.o + $(CC) -L$(LGW_PATH) $< obj/parson.o -o $@ $(LIBS) + +### EOF
\ No newline at end of file |