| 1 |
# -*- makefile -*- |
| 2 |
|
| 3 |
# CXX := c++ |
| 4 |
|
| 5 |
CXXFLAGS := |
| 6 |
CXXFLAGS += -std=c++11 |
| 7 |
|
| 8 |
# CXXFLAGS += -O3 -funroll-loops -fexpensive-optimizations -DNDEBUG |
| 9 |
|
| 10 |
# CXXFLAGS += -g3 -O0 -m32 |
| 11 |
|
| 12 |
WARN := -Wall |
| 13 |
WARN += -Wextra |
| 14 |
WARN += -Wno-sign-compare |
| 15 |
# WARN += -Werror |
| 16 |
|
| 17 |
# Disabled warnings |
| 18 |
# WARN += -pedantic # long long |
| 19 |
# WARN += -W |
| 20 |
# WARN += -Weffc++ |
| 21 |
# WARN += -Wendif-labels |
| 22 |
# WARN += -Wimplicit |
| 23 |
# WARN += -Wmissing-prototypes |
| 24 |
# WARN += -Wnewline-eof |
| 25 |
# WARN += -Wredundant-decls |
| 26 |
# WARN += -Wshadow |
| 27 |
# WARN += -Wuninitialized # Requires -O to work. |
| 28 |
# WARN += -Wunknown-pragmas |
| 29 |
# WARN += -Wunreachable-code |
| 30 |
# WARN += -Wunused |
| 31 |
|
| 32 |
DEBUG := -g -O2 |
| 33 |
# DEBUG := -g3 -DDEBUG=1 |
| 34 |
# DEBUG += -O0 |
| 35 |
# DEBUG += -O |
| 36 |
# DEBUG += -D_GLIBCXX_DEBUG # Bad things on the mac? May be a gtest bug. |
| 37 |
# DEBUG += -D_GLIBCXX_DEBUG_PEDANTIC -D_GLIBCPP_CONCEPT_CHECKS |
| 38 |
|
| 39 |
OPT := -O3 -funroll-loops -fexpensive-optimizations |
| 40 |
OPT += -DNDEBUG |
| 41 |
|
| 42 |
ifdef OPTIMIZE |
| 43 |
CXXFLAGS += ${OPT} |
| 44 |
else |
| 45 |
CXXFLAGS += ${DEBUG} |
| 46 |
endif |
| 47 |
|
| 48 |
|
| 49 |
CXXFLAGS += ${WARN} |
| 50 |
|
| 51 |
SRCS := ais.cpp |
| 52 |
SRCS += ais_bitset.cpp |
| 53 |
SRCS += ais1_2_3.cpp |
| 54 |
SRCS += ais4_11.cpp |
| 55 |
SRCS += ais5.cpp |
| 56 |
SRCS += ais6.cpp |
| 57 |
SRCS += ais7_13.cpp |
| 58 |
SRCS += ais8.cpp |
| 59 |
|
| 60 |
# IMO Messages - Circ 289 |
| 61 |
SRCS += ais8_1_22.cpp # Area notice |
| 62 |
SRCS += ais8_1_26.cpp # Env Sensors |
| 63 |
|
| 64 |
SRCS += ais8_200.cpp # River Information System (RIS) |
| 65 |
|
| 66 |
# US Specific Messages |
| 67 |
SRCS += ais8_366.cpp |
| 68 |
SRCS += ais8_366_22.cpp |
| 69 |
SRCS += ais8_367.cpp |
| 70 |
|
| 71 |
SRCS += ais9.cpp |
| 72 |
SRCS += ais10.cpp |
| 73 |
# See 4 for 11 |
| 74 |
SRCS += ais12.cpp |
| 75 |
# See 7 for 13 |
| 76 |
SRCS += ais14.cpp |
| 77 |
SRCS += ais15.cpp |
| 78 |
SRCS += ais16.cpp |
| 79 |
SRCS += ais17.cpp |
| 80 |
SRCS += ais18.cpp |
| 81 |
SRCS += ais19.cpp |
| 82 |
SRCS += ais20.cpp |
| 83 |
SRCS += ais21.cpp |
| 84 |
SRCS += ais22.cpp |
| 85 |
SRCS += ais23.cpp |
| 86 |
SRCS += ais24.cpp |
| 87 |
SRCS += ais25.cpp |
| 88 |
SRCS += ais26.cpp |
| 89 |
SRCS += ais27.cpp |
| 90 |
#SRCS += ais28.cpp |
| 91 |
|
| 92 |
SRCS += decode_body.cpp |
| 93 |
SRCS += vdm.cpp |
| 94 |
|
| 95 |
OBJS := ${SRCS:.cpp=.o} |
| 96 |
|
| 97 |
all: libais.a |
| 98 |
|
| 99 |
libais.a: ${OBJS} |
| 100 |
ls ${OBJS} |
| 101 |
ar rv $@ $? |
| 102 |
ranlib $@ |
| 103 |
|
| 104 |
clean: |
| 105 |
-rm -rf *.o *.a *.pyc |
| 106 |
-rm -rf *.d *.dSYM |
| 107 |
|
| 108 |
# Deprecated. |
| 109 |
ais_decode_normed: ${OBJS} ais_decode_normed.o ais.h |
| 110 |
@echo SRCS: ${SRCS} |
| 111 |
@echo OBJS: ${OBJS} |
| 112 |
${CXX} -o $@ ${OBJS} ais_decode_normed.o ${CXXFLAGS} |
| 113 |
|
| 114 |
# Hardcoded depends |
| 115 |
ais.o: ais.h |
| 116 |
ais123.o: ais.h |
| 117 |
ais4_11.o: ais.h |
| 118 |
ais5.o: ais.h |
| 119 |
ais6.o: ais.h |
| 120 |
ais7_13.o: ais.h |
| 121 |
ais8_1_22.o: ais.h |
| 122 |
ais9.o: ais.h |
| 123 |
ais10.o: ais.h |
| 124 |
ais12.o: ais.h |
| 125 |
ais14.o: ais.h |
| 126 |
ais15.o: ais.h |
| 127 |
ais16.o: ais.h |
| 128 |
ais17.o: ais.h |
| 129 |
ais18.o: ais.h |
| 130 |
ais19.o: ais.h |
| 131 |
ais20.o: ais.h |
| 132 |
ais21.o: ais.h |
| 133 |
ais22.o: ais.h |
| 134 |
ais23.o: ais.h |
| 135 |
ais24.o: ais.h |
| 136 |
ais25.o: ais.h |
| 137 |
ais26.o: ais.h |
| 138 |
ais27.o: ais.h |
| 139 |
ais_py.o: ais.h |
| 140 |
vdm.o: vdm.h ais.h |
| 141 |
|