diff --git a/Makefile b/Makefile index 3f636a9..fb1616c 100644 --- a/Makefile +++ b/Makefile @@ -8,8 +8,10 @@ PROGRAMMER_TYPE = avrispmkII PROGRAMMER_ARGS = -# Supported radio module variants: 69 and 95 +# Supported RFM radio module variants: 69 and 95 RFM = 95 +# LoRa available only with RFM95 +LORA = 1 # Display dimensions DISPLAY_WIDTH = 320 @@ -26,6 +28,10 @@ override RFM = 0 endif +ifndef LORA +override LORA = 1 +endif + MAIN = avrrfm.c SRC = bitmaps.c colorspace.c dejavu.c display.c font.c i2c.c mcp9808.c \ spi.c tft.c unifont.c usart.c rfm.c sdc.c @@ -37,7 +43,7 @@ AVRDUDE = avrdude CFLAGS = -mmcu=$(MCU) -DF_CPU=$(F_CPU)UL -DBAUD=$(BAUD) -CFLAGS += -DRFM=$(RFM) +CFLAGS += -DRFM=$(RFM) -DLORA=$(LORA) CFLAGS += -DDISPLAY_WIDTH=$(DISPLAY_WIDTH) -DDISPLAY_HEIGHT=$(DISPLAY_HEIGHT) CFLAGS += -DINVERT=$(INVERT) -DBGR=$(BGR) -DHFLIP=$(HFLIP) -DVFLIP=$(VFLIP) CFLAGS += -O2 -I. @@ -51,14 +57,14 @@ TARGET = $(strip $(basename $(MAIN))) SRC += $(TARGET).c -SRC += librfm95.a libsdc.a +SRC += librfm$(RFM).a libsdc.a OBJ = $(SRC:.c=.o) OBJ = $(SRC:.S=.o) $(TARGET).elf: bitmaps.h colorspace.h dejavu.h display.h font.h i2c.h \ mcp9808.h pins.h spi.h tft.h types.h unifont.h usart.h utils.h \ - librfm95.h libsdc.h Makefile + librfm$(RFM).h libsdc.h Makefile all: $(TARGET).hex