@@ -33,7 +33,7 @@ OS:=$(shell uname -s | cut -c -7)
33
33
#
34
34
# Windows rules
35
35
#
36
- ifeq ( $( OS ) ,MINGW32)
36
+ ifneq (, $( findstring $( OS ) ,MINGW32 MSYS_NT) )
37
37
EXE =.exe
38
38
COMMON_SRCS+ =WinSerialPort.cpp WinPortFactory.cpp
39
39
COMMON_LDFLAGS =-Wl,--enable-auto-import -static -static-libstdc++ -static-libgcc
@@ -111,6 +111,30 @@ install: strip app
111
111
mv -f $(BINDIR ) /tmp$(DMG ) $(BINDIR ) /$(DMG )
112
112
endif
113
113
114
+ #
115
+ # OpenBSD rules
116
+ # (This is likely to work without changes, but not tested, on other BSDs)
117
+ #
118
+ ifeq ($(OS ) ,OpenBSD)
119
+
120
+ COMMON_SRCS+ =PosixSerialPort.cpp BSDPortFactory.cpp
121
+
122
+ # This is only needed for bossash, but we can't add it to BOSSASH_LIBS here
123
+ # because that one is redefined later.
124
+ COMMON_LIBS+ =-ltermcap
125
+
126
+ # As of 5.7, OpenBSD packages WxWidgets 2.8
127
+ # bossa builds, runs, and appears to play nicely with this version,
128
+ # but fails to do anything useful on systems that don't have hardware
129
+ # serial ports because of USB detection problems.
130
+ # (The SAM's USB programming port doesn't get recognized as a ucom
131
+ # device, and a USB serial adaptor attached to the UART gets detected
132
+ # by bossa as a USB interface and doesn't fall back to the serial
133
+ # programming protocol.)
134
+ WXVERSION =2.8
135
+
136
+ endif
137
+
114
138
#
115
139
# Object files
116
140
#
@@ -144,7 +168,8 @@ ARMOBJCOPY=$(ARM)objcopy
144
168
#
145
169
# CXX Flags
146
170
#
147
- COMMON_CXXFLAGS+ =-Wall -Werror -MT $@ -MD -MP -MF $(@:%.o=%.d ) -DVERSION=\"$(VERSION ) \" -g -O2
171
+ # COMMON_CXXFLAGS+=-Wall -Werror -MT $@ -MD -MP -MF $(@:%.o=%.d) -DVERSION=\"$(VERSION)\" -g -O2
172
+ COMMON_CXXFLAGS+ =-Wall -MT $@ -MD -MP -MF $(@:%.o=%.d ) -DVERSION=\"$(VERSION ) \" -g -O2
148
173
WX_CXXFLAGS: =$(shell wx-config --cxxflags --version=$(WXVERSION ) ) -DWX_PRECOMP -Wno-ctor-dtor-privacy -O2 -fno-strict-aliasing
149
174
BOSSA_CXXFLAGS =$(COMMON_CXXFLAGS ) $(WX_CXXFLAGS )
150
175
BOSSAC_CXXFLAGS =$(COMMON_CXXFLAGS )
0 commit comments