# PacketiX VPN Bridge (Ver 4.09, Build 9451, SH-4) for Linux
# Makefile
# 
# Copyright (c) SoftEther Corporation. All Rights Reserved.
# Platform: linux-sh4-32bit

CC=gcc
OPTIONS=-O2 -fsigned-char -pthread -lm -ldl -lrt -lpthread -L./ lib/libssl.a lib/libcrypto.a lib/libiconv.a lib/libcharset.a lib/libedit.a lib/libncurses.a lib/libz.a

default:
	@./.install.sh

# NOTE:
# You have to read and agree the license agreement at the same directory
#  before using this software.

i_read_and_agree_the_license_agreement:
	@echo "Preparing PacketiX VPN Bridge..."
	-ranlib lib/libcharset.a
	-ranlib lib/libcrypto.a
	-ranlib lib/libedit.a
	-ranlib lib/libiconv.a
	-ranlib lib/libncurses.a
	-ranlib lib/libssl.a
	-ranlib lib/libz.a
	-ranlib code/vpnbridge.a
	$(CC) code/vpnbridge.a $(OPTIONS) -o vpnbridge
	-ranlib code/vpncmd.a
	$(CC) code/vpncmd.a $(OPTIONS) -o vpncmd
	./vpncmd /tool /cmd:Check
	@echo
	@echo "--------------------------------------------------------------------"
	@echo "The preparation of PacketiX VPN Bridge is completed !"
	@echo
	@echo
	@echo "*** How to switch the display language of the PacketiX VPN Bridge Service ***"
	@echo "PacketiX VPN Bridge supports the following languages:"
	@echo "  - Japanese"
	@echo "  - English"
	@echo "  - Simplified Chinese"
	@echo
	@echo "You can choose your prefered language of PacketiX VPN Bridge at any time."
	@echo "To switch the current language, open and edit the 'lang.config' file."
	@echo
	@echo
	@echo "*** How to start the PacketiX VPN Bridge Service ***"
	@echo
	@echo "Please execute './vpnbridge start' to run the PacketiX VPN Bridge Background Service."
	@echo "And please execute './vpncmd' to run the PacketiX VPN Command-Line Utility to configure PacketiX VPN Bridge."
	@echo "Of course, you can use the VPN Server Manager GUI Application for Windows on the other Windows PC in order to configure the PacketiX VPN Bridge remotely."
	@echo "--------------------------------------------------------------------"
	@echo

clean:
	rm -f vpnbridge
	rm -f vpncmd

