summaryrefslogtreecommitdiff
path: root/lora_pkt_fwd/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'lora_pkt_fwd/Makefile')
-rw-r--r--lora_pkt_fwd/Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/lora_pkt_fwd/Makefile b/lora_pkt_fwd/Makefile
index 1330d62..dda589e 100644
--- a/lora_pkt_fwd/Makefile
+++ b/lora_pkt_fwd/Makefile
@@ -22,7 +22,7 @@ RELEASE_VERSION := `cat ../VERSION`
CC := $(CROSS_COMPILE)gcc
AR := $(CROSS_COMPILE)ar
-CFLAGS := -O2 -Wall -Wextra -std=c99 -Iinc -I.
+MORECFLAGS := -Wall -Wextra -std=c99 -Iinc -I. -isystem =/usr/include/gps
VFLAG := -D VERSION_STRING="\"$(RELEASE_VERSION)\""
### Constants for Lora concentrator HAL library
@@ -38,7 +38,7 @@ LGW_INC += $(LGW_PATH)/inc/loragw_gps.h
### Linking options
-LIBS := -lloragw -lrt -lpthread -lm
+LIBS := -lloragw -lrt -lpthread -lm -lgps
### General build targets
@@ -54,12 +54,14 @@ $(OBJDIR):
mkdir -p $(OBJDIR)
$(OBJDIR)/%.o: src/%.c $(INCLUDES) | $(OBJDIR)
- $(CC) -c $(CFLAGS) -I$(LGW_PATH)/inc $< -o $@
+ @echo compile $@
+ $(CC) -c $(CFLAGS) $(MORECFLAGS) -I$(LGW_PATH)/inc $< -o $@
### Main program compilation and assembly
$(OBJDIR)/$(APP_NAME).o: src/$(APP_NAME).c $(LGW_INC) $(INCLUDES) | $(OBJDIR)
- $(CC) -c $(CFLAGS) $(VFLAG) -I$(LGW_PATH)/inc $< -o $@
+ @echo compile $@
+ $(CC) -c $(CFLAGS) $(MORECFLAGS) $(VFLAG) -I$(LGW_PATH)/inc $< -o $@
$(APP_NAME): $(OBJDIR)/$(APP_NAME).o $(LGW_PATH)/libloragw.a $(OBJDIR)/parson.o $(OBJDIR)/base64.o $(OBJDIR)/jitqueue.o $(OBJDIR)/timersync.o
$(CC) -L$(LGW_PATH) $< $(OBJDIR)/parson.o $(OBJDIR)/base64.o $(OBJDIR)/jitqueue.o $(OBJDIR)/timersync.o -o $@ $(LIBS)