Commit f192630c2dd0f886b9473a838eda5f285e7f6c80
1 parent
07f31c87
Exists in
master
and in
1 other branch
Adding windows SDK files.
Showing
2 changed files
with
38 additions
and
9 deletions
Show diff stats
Makefile.in
| ... | ... | @@ -37,6 +37,8 @@ SOURCES= \ |
| 37 | 37 | TEST_SOURCES= \ |
| 38 | 38 | $(wildcard src/testprogram/*.cc) |
| 39 | 39 | |
| 40 | +INSTALL_PACKAGES=@INSTALL_PACKAGES@ | |
| 41 | + | |
| 40 | 42 | #---[ Tools ]---------------------------------------------------------------------------- |
| 41 | 43 | |
| 42 | 44 | CXX=@CXX@ |
| ... | ... | @@ -56,6 +58,7 @@ CONVERT=@CONVERT@ |
| 56 | 58 | OPTIPNG=@OPTIPNG@ |
| 57 | 59 | ZIP=@ZIP@ |
| 58 | 60 | DOXYGEN=@DOXYGEN@ |
| 61 | +DLLTOOL=@DLLTOOL@ | |
| 59 | 62 | |
| 60 | 63 | #---[ Paths ]---------------------------------------------------------------------------- |
| 61 | 64 | |
| ... | ... | @@ -159,17 +162,16 @@ $(BINRLS)/$(SONAME): \ |
| 159 | 162 | @$(MKDIR) $(dir $@) |
| 160 | 163 | @echo $< ... |
| 161 | 164 | @$(LD) \ |
| 162 | - -shared -Wl,-soname,$(@F) \ | |
| 163 | - -o $@ \ | |
| 164 | 165 | $(LDFLAGS) \ |
| 166 | + -Wl,-soname,$(@F) \ | |
| 167 | + -o $@ \ | |
| 165 | 168 | $^ \ |
| 166 | 169 | $(LIBS) |
| 167 | 170 | |
| 168 | 171 | #---[ Install Targets ]------------------------------------------------------------------ |
| 169 | 172 | |
| 170 | 173 | install: \ |
| 171 | - install-shared \ | |
| 172 | - install-devel | |
| 174 | + $(foreach PKG, $(INSTALL_PACKAGES), install-$(PKG)) | |
| 173 | 175 | |
| 174 | 176 | |
| 175 | 177 | install-shared: \ |
| ... | ... | @@ -186,7 +188,7 @@ install-shared: \ |
| 186 | 188 | $(LIBNAME)@DLLEXT@.@PACKAGE_MAJOR_VERSION@.@PACKAGE_MINOR_VERSION@ \ |
| 187 | 189 | $(DESTDIR)$(libdir)/$(LIBNAME)@DLLEXT@.@PACKAGE_MAJOR_VERSION@ |
| 188 | 190 | |
| 189 | -install-devel: | |
| 191 | +install-dev: | |
| 190 | 192 | |
| 191 | 193 | # Install devel |
| 192 | 194 | @$(MKDIR) $(DESTDIR)$(includedir)/lib3270 |
| ... | ... | @@ -200,6 +202,29 @@ install-devel: |
| 200 | 202 | $(DESTDIR)$(libdir)/$(LIBNAME)@DLLEXT@ |
| 201 | 203 | |
| 202 | 204 | |
| 205 | +install-winlib: \ | |
| 206 | + $(BINRLS)/$(SONAME) | |
| 207 | + | |
| 208 | + @$(MKDIR) \ | |
| 209 | + $(DESTDIR)$(libdir) | |
| 210 | + | |
| 211 | + @$(INSTALL_DATA) \ | |
| 212 | + $(BINRLS)/$(LIBNAME).dll.a \ | |
| 213 | + $(DESTDIR)$(libdir) | |
| 214 | + | |
| 215 | + @$(DLLTOOL) \ | |
| 216 | + --input-def $(BINRLS)/$(LIBNAME).def \ | |
| 217 | + --dllname $(LIBNAME).dll \ | |
| 218 | + --output-lib $(DESTDIR)$(libdir)/$(LIBNAME).lib | |
| 219 | + | |
| 220 | + @$(MKDIR) \ | |
| 221 | + $(DESTDIR)$(datarootdir)/$(PRODUCT_NAME)/def | |
| 222 | + | |
| 223 | + @$(INSTALL_DATA) \ | |
| 224 | + $(BINRLS)/$(LIBNAME).def \ | |
| 225 | + $(DESTDIR)$(datarootdir)/$(PRODUCT_NAME)/def | |
| 226 | + | |
| 227 | + | |
| 203 | 228 | doc: |
| 204 | 229 | @$(DOXYGEN) ./doxygen/doxyfile |
| 205 | 230 | |
| ... | ... | @@ -245,10 +270,10 @@ $(BINDBG)/$(SONAME): \ |
| 245 | 270 | @$(MKDIR) $(dir $@) |
| 246 | 271 | @echo $< ... |
| 247 | 272 | @$(LD) \ |
| 248 | - -shared -Wl,-soname,$(@F) \ | |
| 273 | + $(LDFLAGS) \ | |
| 274 | + -Wl,-soname,$(@F) \ | |
| 249 | 275 | -o $@ \ |
| 250 | 276 | -L$(BINDBG) \ |
| 251 | - $(LDFLAGS) \ | |
| 252 | 277 | $^ \ |
| 253 | 278 | $(LIBS) |
| 254 | 279 | ... | ... |
configure.ac
| ... | ... | @@ -92,13 +92,15 @@ AC_SUBST(APPDATADIR,$app_cv_source_appdatadir) |
| 92 | 92 | dnl --------------------------------------------------------------------------- |
| 93 | 93 | dnl Check for OS specifics |
| 94 | 94 | dnl --------------------------------------------------------------------------- |
| 95 | +INSTALL_PACKAGES="shared dev" | |
| 95 | 96 | |
| 96 | 97 | case "$host" in |
| 97 | 98 | *-mingw32|*-pc-msys) |
| 98 | 99 | app_cv_osname="windows" |
| 99 | 100 | |
| 100 | 101 | CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0600" |
| 101 | - LDFLAGS="$LDFLAGS" | |
| 102 | + LDFLAGS="$LDFLAGS -shared -Wl,--output-def,\$(@D)/\$(LIBNAME).def,--out-implib,\$(@D)/\$(LIBNAME).dll.a" | |
| 103 | + INSTALL_PACKAGES="$INSTALL_PACKAGES winlib" | |
| 102 | 104 | |
| 103 | 105 | LIBS="$LIBS -lws2_32 -lwtsapi32 -lcomdlg32" |
| 104 | 106 | DLLEXT=".dll" |
| ... | ... | @@ -128,7 +130,7 @@ case "$host" in |
| 128 | 130 | |
| 129 | 131 | *) |
| 130 | 132 | CFLAGS="$CFLAGS" |
| 131 | - LDFLAGS="$LDFLAGS" | |
| 133 | + LDFLAGS="$LDFLAGS -shared" | |
| 132 | 134 | app_cv_datadir="/usr/share" |
| 133 | 135 | app_cv_confdir="/etc" |
| 134 | 136 | app_cv_osname="linux" |
| ... | ... | @@ -145,6 +147,7 @@ AC_SUBST(LIBS) |
| 145 | 147 | AC_SUBST(LOGDIR) |
| 146 | 148 | AC_SUBST(DLLEXT) |
| 147 | 149 | AC_SUBST(DLLPREFIX) |
| 150 | +AC_SUBST(INSTALL_PACKAGES) | |
| 148 | 151 | |
| 149 | 152 | dnl --------------------------------------------------------------------------- |
| 150 | 153 | dnl Check for other programs |
| ... | ... | @@ -153,6 +156,7 @@ dnl --------------------------------------------------------------------------- |
| 153 | 156 | AC_PATH_TOOL([AR], [ar], [ar]) |
| 154 | 157 | AC_PATH_TOOL([WINDRES], [windres], [no]) |
| 155 | 158 | AC_PATH_TOOL([VALGRIND], [valgrind], [no]) |
| 159 | +AC_PATH_TOOL([DLLTOOL], [dlltool], [no]) | |
| 156 | 160 | |
| 157 | 161 | PKG_CHECK_EXISTS |
| 158 | 162 | ... | ... |