diff --git a/conf/modules/gps_ublox.xml b/conf/modules/gps_ublox.xml
index cbec6341c9..8efe27fd7e 100644
--- a/conf/modules/gps_ublox.xml
+++ b/conf/modules/gps_ublox.xml
@@ -22,9 +22,10 @@
+ UBX_GPS_PORT_LOWER=$(shell echo $(GPS_PORT) | tr A-Z a-z)
ap.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_ubx.h\"
ap.CFLAGS += -DUSE_$(GPS_PORT) -D$(GPS_PORT)_BAUD=$(GPS_BAUD)
- ap.CFLAGS += -DUSE_GPS -DGPS_LINK=$(GPS_PORT)
+ ap.CFLAGS += -DUSE_GPS -DGPS_LINK=$(UBX_GPS_PORT_LOWER)
GPS_LED ?= none
ifneq ($(GPS_LED),none)
ap.CFLAGS += -DGPS_LED=$(GPS_LED)
@@ -44,7 +45,6 @@
sim.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_sim.h\"
- jsbsim.CFLAGS += -DGPS_TYPE_H=\"subsystems/gps/gps_sim.h\"