Skip to content

Commit

Permalink
Add native windows (x64) support
Browse files Browse the repository at this point in the history
Co-Authored-By: xybp888 <[email protected]>
  • Loading branch information
s0uthwest and xybp888 committed Aug 13, 2019
1 parent b691583 commit ca98060
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 119 deletions.
17 changes: 16 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,25 @@ AC_PROG_LIBTOOL
CFLAGS+=" -std=c11"
AC_PROG_INSTALL

# Versioning
# Versioning.
CFLAGS+=" -D IMG4TOOL_VERSION_COUNT=\\\"$(git rev-list --count HEAD | tr -d '\n')\\\""
CFLAGS+=" -D IMG4TOOL_VERSION_SHA=\\\"$(git rev-parse HEAD | tr -d '\n')\\\""

# Checks the platform.
AC_MSG_CHECKING([whether to enable WIN32 specific flags])
case "$host_os" in
*mingw*)
win32=true
AC_MSG_RESULT([yes])
AC_CHECK_TOOL(WINDRES, windres)
;;
*)
win32=false
AC_MSG_RESULT([no])
;;
esac
AM_CONDITIONAL(WIN32, test x$win32 = xtrue)

# Checks for libraries.
AC_ARG_WITH([openssl],
[AS_HELP_STRING([--without-openssl],
Expand Down
5 changes: 5 additions & 0 deletions img4tool/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,10 @@ AM_LDFLAGS += $(libplist_LIBS) $(libplistmm_LDFLAGS)
bin_PROGRAMS = img4tool
img4tool_CFLAGS = $(AM_CFLAGS)
img4tool_LDADD = $(AM_LDFLAGS)

if WIN32
img4tool_LDFLAGS = -all-static -static-libgcc -static-libstdc++ $(AM_LDFLAGS)
endif

img4tool_SOURCES = img4tool.c img4.c lzssdec.c
endif
Loading

0 comments on commit ca98060

Please sign in to comment.