1
0
mirror of https://github.com/mintty/wsltty.git synced 2025-01-18 12:05:47 +00:00
wsltty/makefile

107 lines
3.1 KiB
Makefile
Raw Normal View History

2016-09-11 14:20:39 +02:00
#############################################################################
# default: generate all
all: check pkg
2016-09-11 14:20:39 +02:00
# wsltty release
ver=0.7.0
# mintty release version
minver=2.7.0
#minver=master
# wslbridge backend version
wslbridgever=0.2.0
# wslbridge frontend version
# release 0.2.0 does not have cygwin_internal(CW_SYNC_WINENV) yet;
# therefore using "master" below
#############################################################################
# target checking and some defs
2016-09-11 14:20:39 +02:00
TARGET := $(shell $(CC) -dumpmachine)
ifeq ($(TARGET), i686-pc-cygwin)
sys := cygwin32
else ifeq ($(TARGET), x86_64-pc-cygwin)
sys := cygwin64
else ifeq ($(TARGET), i686-pc-msys)
sys := msys32
else ifeq ($(TARGET), x86_64-pc-msys)
sys := msys64
else
$(error Target '$(TARGET)' not supported)
endif
wget=curl -R -L --connect-timeout 55 -O
wgeto=curl -R -L --connect-timeout 55
2016-09-14 15:37:55 +02:00
#############################################################################
# system check;
# for now, let's enforce Cygwin 32-Bit as the container for wsltty
# just in case there is a 32-Bit WSL released (-> 32 bit), and to ensure
# the path name drag-and-drop adaptation works (-> cygwin, not msys)
check:
# checking suitable host environment; run `make pkg` to bypass
uname | grep CYGWIN # check cygwin (vs msys) for proper drag-and-drop paths
uname -m | grep i686 # check 32 bit (vs 64 bit) just in case
2016-09-11 14:20:39 +02:00
#############################################################################
# generation
wslbridge: wslbridge-backend wslbridge-frontend
wslbridge-backend:
2016-09-14 15:37:55 +02:00
$(wget) https://github.com/rprichard/wslbridge/releases/download/$(wslbridgever)/wslbridge-$(wslbridgever)-$(sys).tar.gz
2016-09-11 14:20:39 +02:00
tar xvzf wslbridge-$(wslbridgever)-$(sys).tar.gz
mkdir -p bin
cp wslbridge-$(wslbridgever)-$(sys)/wslbridge-backend bin/
2016-09-11 14:20:39 +02:00
cp wslbridge-$(wslbridgever)-$(sys)/LICENSE.txt LICENSE.wslbridge
wslbridge-frontend:
$(wgeto) https://github.com/rprichard/wslbridge/archive/master.zip -o wslbridge-master.zip
unzip -o wslbridge-master.zip
cd wslbridge-master/frontend; make
strip wslbridge-master/out/wslbridge.exe
mkdir -p bin
cp wslbridge-master/out/wslbridge.exe bin/
cp wslbridge-master/LICENSE.txt LICENSE.wslbridge
2016-09-11 14:20:39 +02:00
mintty:
$(wgeto) https://github.com/mintty/mintty/archive/$(minver).zip -o mintty-$(minver).zip
unzip -o mintty-$(minver).zip
cd mintty-$(minver)/src; make LDFLAGS="-static -static-libgcc -s"
2016-09-11 14:20:39 +02:00
mkdir -p bin
cp mintty-$(minver)/bin/mintty.exe bin/
cp mintty-$(minver)/LICENSE LICENSE.mintty
2016-09-11 14:20:39 +02:00
cygwin:
mkdir -p bin
cp /bin/cygwin1.dll bin/
cp /bin/cygwin-console-helper.exe bin/
#cp /bin/dash.exe bin/
2016-09-11 14:20:39 +02:00
wsltty:
pkg: wslbridge mintty cygwin wsltty
2016-09-11 14:20:39 +02:00
mkdir -p rel
sed -e "s,%version%,$(ver)," makewinx.cfg > rel/wsltty.SED
cp bin/cygwin1.dll rel/
cp bin/cygwin-console-helper.exe rel/
#cp bin/dash.exe rel/
2016-09-11 14:20:39 +02:00
cp bin/mintty.exe rel/
cp bin/wslbridge.exe rel/
cp bin/wslbridge-backend rel/
cp LICENSE.mintty rel/
cp LICENSE.wslbridge rel/
cp "Bash on UoW in Mintty.lnk" rel/
cp "Bash ~ on UoW in Mintty.lnk" rel/
2016-09-19 00:46:51 +02:00
cp wsl.bat rel/
cp wsl~.bat rel/
2016-09-11 14:20:39 +02:00
cp install.bat rel/
cp uninstall.bat rel/
2016-09-11 14:20:39 +02:00
cd rel; iexpress /n wsltty.SED
#############################################################################
# end