mingw compilation fixes, patch by Daniel Atallah.
authorPekka Riikonen <priikone@silcnet.org>
Sat, 1 Sep 2007 10:47:38 +0000 (10:47 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 1 Sep 2007 10:47:38 +0000 (10:47 +0000)
lib/Makefile.ad
lib/contrib/Makefile.ad
lib/silcutil/silcnet.h

index 79473f739e9ba25f51fb969674858278f64117fa..4f8b11af62d296b4bf565583684c98d717808969 100644 (file)
@@ -56,7 +56,11 @@ SILCLIB_DIRS =               \
 #endif SILC_DIST_SSH
 
 if SILC_ENABLE_SHARED
+if SILC_WIN32
+LIBTOOL_OPTS= -release $(LIB_BASE_VERSION) -rpath $(DESTDIR)$(libdir) -export-dynamic -no-undefined
+else
 LIBTOOL_OPTS= -release $(LIB_BASE_VERSION) -rpath $(DESTDIR)$(libdir)
+endif
 LIBTOOL_SILC_VERSION = -version-info $(LIBSILC_CURRENT):$(LIBSILC_REVISION):$(LIBSILC_AGE)
 LIBTOOL_SILCCLIENT_VERSION = -version-info $(LIBSILCCLIENT_CURRENT):$(LIBSILCCLIENT_REVISION):$(LIBSILCCLIENT_AGE)
 LIBTOOL_SILCSERVER_VERSION = -version-info $(LIBSILCSERVER_CURRENT):$(LIBSILCSERVER_REVISION):$(LIBSILCSERVER_AGE)
@@ -67,6 +71,16 @@ LIBTOOL_SILCCLIENT_VERSION =
 LIBTOOL_SILCSERVER_VERSION = 
 endif
 
+if SILC_WIN32
+SILC_LIBS=$(LIBS)
+SILCCLIENT_LIBS=$(LIBS) -lsilc
+SILCSERVER_LIBS=$(LIBS) -lsilc
+else
+SILC_LIBS=
+SILCCLIENT_LIBS=
+SILCSERVER_LIBS=
+endif
+
 SILCLIB = libsilc.a
 
 #ifdef SILC_DIST_CLIENTLIB
@@ -134,7 +148,7 @@ LIBSILC_AGE=@LIBSILC_AGE@
 
 libsilc.a:
        find $(SILCLIB_DIRS) -type f -name *.lo | xargs \
-       $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) \
+       $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(SILC_LIBS) \
        $(LIBTOOL_SILC_VERSION) \
        $(LIBTOOL_OPTS) -o libsilc.la
 
@@ -145,7 +159,7 @@ LIBSILCCLIENT_AGE=@LIBSILCCLIENT_AGE@
 
 libsilcclient.a:
        find $(SILCCLIENTLIB_DIRS) -type f -name *.lo | xargs \
-       $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) \
+       $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(SILCCLIENT_LIBS) \
        $(LIBTOOL_SILCCLIENT_VERSION) \
        $(LIBTOOL_OPTS) -o libsilcclient.la
 #endif SILC_DIST_CLIENTLIB
@@ -157,7 +171,7 @@ LIBSILCSERVER_AGE=@LIBSILCSERVER_AGE@
 
 libsilcserver.a:
        find $(SILCSERVERLIB_DIRS) -type f -name *.lo | xargs \
-       $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) \
+       $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(LDFLAGS) $(SILCSERVER_LIBS) \
        $(LIBTOOL_SILCSERVER_VERSION) \
        $(LIBTOOL_OPTS) -o libsilcserver.la
 #endif SILC_DIST_SERVERLIB
index 1fab5f707eb1df82c12cde11a1ed36d0a19882fc..960a37478f0655bec55ee73e2de2868360212394 100644 (file)
@@ -27,11 +27,7 @@ endif
 
 STRINGPREP = nfkc.c rfc3454.c stringprep.c
 
-if SILC_WIN32
-libcontrib_la_SOURCES = getopti.c $(STRINGPREP)
-else
 libcontrib_la_SOURCES = getopti.c $(STRINGPREP) $(REGEX)
-endif
 
 EXTRA_DIST = *.c *.h
 
index 3bbc40ab665501b7b3c34625d347afcb8408b7a0..f2e040b6588bb60b7d8b8927aa40e6f16c153aed 100644 (file)
  * Various utility functions for resolving various information is also
  * provided.
  *
- * On WIN32 systems the SILC Net API must initialized by calling the
- * silc_net_win32_init and uninitialized when the application ends by
- * calling the silc_net_win32_uninit function. The initializing must be
- * done in order to assure that the SILC Net API works correctly.
- *
  ***/
 
 #ifndef SILCNET_H