OPENCONNECT_OBJS := main.o ssl_ui.o xml.o
CONNECTION_OBJS := dtls.o cstp.o mainloop.o tun.o
-AUTH_OBJECTS := ssl.o http.o
+AUTH_OBJECTS := ssl.o http.o version.o
all: anyconnect nm-openconnect-auth-dialog
-version.h: $(patsubst %.o,%.c,$(OBJECTS)) anyconnect.h $(wildcard .git/index .git/refs/tags) version.sh
+version.c: $(patsubst %.o,%.c,$(OBJECTS)) anyconnect.h $(wildcard .git/index .git/refs/tags) version.sh
@./version.sh
- @echo -en "New version.h: "
- @grep define version.h | cut -f2 -d\"
-
-main.o: version.h
+ @echo -en "New version.c: "
+ @cut -f2 -d\" version.c
libopenconnect.a: $(AUTH_OBJECTS)
$(AR) rcs $@ $^
/* http.c */
int openconnect_obtain_cookie(struct anyconnect_info *vpninfo);
+char *openconnect_create_useragent(char *base);
/* ssl_ui.c */
int set_openssl_ui(void);
+/* version.c */
+extern char openconnect_version[];
+
#endif /* __OPENCONNECT_ANYCONNECT_H */
fi
fi
-echo "#ifndef ANYCONNECT_VERSION" > .build-version.h
-echo "#define ANYCONNECT_VERSION \"$v\"" >> .build-version.h
-echo "#endif" >> .build-version.h
+echo "char openconnect_version[] = \"$v\";" > version.c
-#diff -q version.h .build-version.h >& /dev/null
-#
-#if [ $? == 0 ]; then
-# rm .build-version.h
-# exit 0
-#fi
-
-mv -f .build-version.h version.h