Skip to content

Commit 7a0456c

Browse files
committed
updated makefile for MSYS and OpenBSD builds
1 parent cdeeb53 commit 7a0456c

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

Makefile

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ OS:=$(shell uname -s | cut -c -7)
3333
#
3434
# Windows rules
3535
#
36-
ifeq ($(OS),MINGW32)
36+
ifneq (,$(findstring $(OS),MINGW32 MSYS_NT))
3737
EXE=.exe
3838
COMMON_SRCS+=WinSerialPort.cpp WinPortFactory.cpp
3939
COMMON_LDFLAGS=-Wl,--enable-auto-import -static -static-libstdc++ -static-libgcc
@@ -111,6 +111,30 @@ install: strip app
111111
mv -f $(BINDIR)/tmp$(DMG) $(BINDIR)/$(DMG)
112112
endif
113113

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+
114138
#
115139
# Object files
116140
#
@@ -144,7 +168,8 @@ ARMOBJCOPY=$(ARM)objcopy
144168
#
145169
# CXX Flags
146170
#
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
148173
WX_CXXFLAGS:=$(shell wx-config --cxxflags --version=$(WXVERSION)) -DWX_PRECOMP -Wno-ctor-dtor-privacy -O2 -fno-strict-aliasing
149174
BOSSA_CXXFLAGS=$(COMMON_CXXFLAGS) $(WX_CXXFLAGS)
150175
BOSSAC_CXXFLAGS=$(COMMON_CXXFLAGS)

0 commit comments

Comments
 (0)