|
|
|
SNAPSHOT = $(shell test -f SNAPSHOT && cat SNAPSHOT)
|
|
|
|
VERSION = @PACKAGE_VERSION@$(SNAPSHOT)
|
|
|
|
EXE = @PACKAGE_TARNAME@$(SNAPSHOT).exe
|
|
|
|
|
|
|
|
CC = @CC@
|
|
|
|
WINDRES = @WINDRES@
|
|
|
|
|
|
|
|
LDFLAGS = @CRYPTO_LDFLAGS@ @LDFLAGS@
|
|
|
|
LIBS = @CRYPTO_LIBS@ @LIBS@
|
|
|
|
CFLAGS = @CRYPTO_CPPFLAGS@ @CFLAGS@ @CPPFLAGS@
|
|
|
|
CFLAGS += -W -Wall -Wno-unused-parameter -pedantic
|
|
|
|
|
|
|
|
OBJS = main.o tray.o openvpn.o viewlog.o \
|
|
|
|
service.o options.o passphrase.o proxy.o registry.o manage.o \
|
|
|
|
openvpn_config.o scripts.o localization.o openvpn-gui-res.o
|
|
|
|
|
|
|
|
SOURCES = main.c main.h openvpn.c openvpn.h localization.c localization.h \
|
|
|
|
tray.c tray.h viewlog.c viewlog.h service.c service.h \
|
|
|
|
options.c options.h passphrase.c passphrase.h proxy.c proxy.h \
|
|
|
|
registry.c registry.h scripts.c scripts.h manage.c manage.h \
|
|
|
|
openvpn_config.c openvpn_config.h openvpn-gui.manifest \
|
|
|
|
chartable.h openvpn-gui-res.h openvpn-gui-res*.rc
|
|
|
|
|
|
|
|
EXTRA = connected.ico connecting.ico disconnected.ico reconnecting.ico openvpn-gui.ico \
|
|
|
|
acinclude.m4 Makefile.in aclocal.m4 config.h.in configure configure.ac \
|
|
|
|
OpenVPN\ GUI\ ReadMe.txt changes.txt COPYING COPYRIGHT.GPL
|
|
|
|
|
|
|
|
all : ${OBJS}
|
|
|
|
${CC} $(CFLAGS) $(LDFLAGS) -o $(EXE) ${OBJS} ${LIBS}
|
|
|
|
|
|
|
|
%.o : %.c %.h
|
|
|
|
$(CC) $(CFLAGS) -c $<
|
|
|
|
|
|
|
|
openvpn-gui-res.o : openvpn-gui-res.h *.rc *.ico *.manifest
|
|
|
|
$(WINDRES) -i openvpn-gui-res.rc -o openvpn-gui-res.o
|
|
|
|
|
|
|
|
dist:
|
|
|
|
rm -rf @PACKAGE_TARNAME@-*/
|
|
|
|
mkdir @PACKAGE_TARNAME@-$(VERSION)
|
|
|
|
cp $(SOURCES) $(EXTRA) @PACKAGE_TARNAME@-$(VERSION)
|
|
|
|
test ! -f SNAPSHOT || { \
|
|
|
|
cd openvpn-gui-$(VERSION); \
|
|
|
|
cp ../SNAPSHOT .; \
|
|
|
|
sed -i -e 's/\[MAJOR_VERSION.MINOR_VERSION.RELEASE\]/[$(subst -,,$(SNAPSHOT))]/' configure.ac; \
|
|
|
|
autoconf; \
|
|
|
|
cd -; \
|
|
|
|
}
|
|
|
|
tar -czf @PACKAGE_TARNAME@-$(VERSION).tar.gz @PACKAGE_TARNAME@-$(VERSION)
|
|
|
|
rm -rf @PACKAGE_TARNAME@-$(VERSION)
|
|
|
|
|
|
|
|
snapshot:
|
|
|
|
echo "-`date +%Y%m%d%H%M%S`" > SNAPSHOT
|
|
|
|
$(MAKE) dist
|
|
|
|
rm -f SNAPSHOT
|
|
|
|
|
|
|
|
clean :
|
|
|
|
rm -f *.o *.exe
|