diff --git a/Makefile b/Makefile
index 30fa844..6cc6f97 100644
--- a/Makefile
+++ b/Makefile
@@ -44,13 +44,13 @@ all: dump1090 view1090
%.o: %.c *.h
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
-dump1090: dump1090.o anet.o interactive.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o demod_2400.o stats.o cpr.o icao_filter.o track.o util.o convert.o sdr_ifile.o sdr.o $(SDR_OBJ) $(COMPAT)
+dump1090: dump1090.o anet.o interactive.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o demod_2400.o stats.o cpr.o icao_filter.o track.o util.o convert.o sdr_ifile.o sdr.o ais_charset.o $(SDR_OBJ) $(COMPAT)
$(CC) -g -o $@ $^ $(LDFLAGS) $(LIBS) $(LIBS_SDR) -lncurses
-view1090: view1090.o anet.o interactive.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o stats.o cpr.o icao_filter.o track.o util.o $(COMPAT)
+view1090: view1090.o anet.o interactive.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o stats.o cpr.o icao_filter.o track.o util.o ais_charset.o $(COMPAT)
$(CC) -g -o $@ $^ $(LDFLAGS) $(LIBS) -lncurses
-faup1090: faup1090.o anet.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o stats.o cpr.o icao_filter.o track.o util.o $(COMPAT)
+faup1090: faup1090.o anet.o mode_ac.o mode_s.o comm_b.o net_io.o crc.o stats.o cpr.o icao_filter.o track.o util.o ais_charset.o $(COMPAT)
$(CC) -g -o $@ $^ $(LDFLAGS) $(LIBS)
clean:
diff --git a/ais_charset.c b/ais_charset.c
new file mode 100644
index 0000000..a487e3c
--- /dev/null
+++ b/ais_charset.c
@@ -0,0 +1,3 @@
+#include "ais_charset.h"
+
+char ais_charset[64] = "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_ !\"#$%&'()*+,-./0123456789:;<=>?";
diff --git a/ais_charset.h b/ais_charset.h
new file mode 100644
index 0000000..93d4a72
--- /dev/null
+++ b/ais_charset.h
@@ -0,0 +1,6 @@
+#ifndef AIS_CHARSET_H
+#define AIS_CHARSET_H
+
+extern char ais_charset[64];
+
+#endif
diff --git a/comm_b.c b/comm_b.c
index 519bf84..0820eff 100644
--- a/comm_b.c
+++ b/comm_b.c
@@ -19,6 +19,7 @@
// along with this program. If not, see .
#include "dump1090.h"
+#include "ais_charset.h"
typedef int (*CommBDecoderFn)(struct modesMessage *,bool);
diff --git a/mode_s.c b/mode_s.c
index 552cf39..6b30470 100644
--- a/mode_s.c
+++ b/mode_s.c
@@ -49,6 +49,7 @@
#include "dump1090.h"
+#include "ais_charset.h"
/* for PRIX64 */
#include
@@ -382,8 +383,6 @@ int scoreModesMessage(unsigned char *msg, int validbits)
static void decodeExtendedSquitter(struct modesMessage *mm);
-char ais_charset[64] = "@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_ !\"#$%&'()*+,-./0123456789:;<=>?";
-
// return 0 if all OK
// -1: message might be valid, but we couldn't validate the CRC against a known ICAO
// -2: bad message or unrepairable CRC error
diff --git a/mode_s.h b/mode_s.h
index 4fbc983..1444d27 100644
--- a/mode_s.h
+++ b/mode_s.h
@@ -95,6 +95,4 @@ static inline __attribute__((always_inline)) unsigned getbits(unsigned char *da
}
}
-extern char ais_charset[64];
-
#endif