diff options
-rw-r--r-- | Makefile.sol.mingw | 5 | ||||
-rw-r--r-- | include/Exceptions.h | 1 | ||||
-rw-r--r-- | include/Handle.h | 1 | ||||
-rw-r--r-- | lib/Exceptions.cc | 8 | ||||
-rw-r--r-- | lib/Handle.cc | 5 | ||||
-rw-r--r-- | lib/Main.cc | 4 | ||||
-rw-r--r-- | lib/Makefile.sol.mingw | 17 | ||||
-rw-r--r-- | lib/Output.cc | 5 | ||||
-rw-r--r-- | lib/fileutils.cc | 5 | ||||
-rw-r--r-- | lib/generic.cc | 4 |
10 files changed, 34 insertions, 21 deletions
diff --git a/Makefile.sol.mingw b/Makefile.sol.mingw index 168a4fc..7fb7ccc 100644 --- a/Makefile.sol.mingw +++ b/Makefile.sol.mingw @@ -1,4 +1,5 @@ all: - $(MAKE) -C lib -f Makefile.sol.mingw - + $(MAKE) -C lib -f Makefile.sol.mingw all +clean: + $(MAKE) -C lib -f Makefile.sol.mingw clean diff --git a/include/Exceptions.h b/include/Exceptions.h index b1ca63f..c9756c9 100644 --- a/include/Exceptions.h +++ b/include/Exceptions.h @@ -2,7 +2,6 @@ #define __EXCEPTIONS_H__ #include <stdio.h> -#include <unistd.h> #include <stddef.h> #include <string.h> #include <stdlib.h> diff --git a/include/Handle.h b/include/Handle.h index 581d9d0..920a634 100644 --- a/include/Handle.h +++ b/include/Handle.h @@ -5,7 +5,6 @@ #include <time.h> #include <zlib.h> -#include <unistd.h> #include <iostream> #include <String.h> #include <Exceptions.h> diff --git a/lib/Exceptions.cc b/lib/Exceptions.cc index 110ffaa..448d161 100644 --- a/lib/Exceptions.cc +++ b/lib/Exceptions.cc @@ -1,16 +1,18 @@ #include <malloc.h> -#include <unistd.h> #include <string.h> #include <errno.h> #include <stddef.h> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #ifdef HAVE_GLIB #include <glib.h> #endif #ifdef DEBUG #include <iostream> #endif -#ifdef HAVE_CONFIG_H -#include "config.h" +#ifdef HAVE_PIPE +#include <unistd.h> #endif #include "String.h" #include "Exceptions.h" diff --git a/lib/Handle.cc b/lib/Handle.cc index 013b749..07a2752 100644 --- a/lib/Handle.cc +++ b/lib/Handle.cc @@ -1,11 +1,12 @@ #include <stdio.h> -#include <unistd.h> #include <string.h> #include <errno.h> -#include <fcntl.h> #ifdef HAVE_CONFIG_H #include "config.h" #endif +#ifdef HAVE_FCNTL_H +#include <fcntl.h> +#endif #include "Handle.h" #include "gettext.h" diff --git a/lib/Main.cc b/lib/Main.cc index 64cdc7d..653adea 100644 --- a/lib/Main.cc +++ b/lib/Main.cc @@ -1,8 +1,8 @@ -#include "Main.h" -#include "generic.h" #ifdef HAVE_CONFIG_H #include "config.h" #endif +#include "Main.h" +#include "generic.h" Main::Main() : setted(false) {} diff --git a/lib/Makefile.sol.mingw b/lib/Makefile.sol.mingw index 8f15e9e..0550fa8 100644 --- a/lib/Makefile.sol.mingw +++ b/lib/Makefile.sol.mingw @@ -1,14 +1,17 @@ CC = i586-mingw32msvc-gcc CXX = i586-mingw32msvc-g++ -LD = i586-mingw32msvc-ld +AR = i586-mingw32msvc-ar +RANLIB = i586-mingw32msvc-ranlib CPPFLAGS = -I../include -DFORCE64 -OBJECTS = Exceptions.o Handle.o Image.o Input.o Main.o Output.o String.o \ - checkargs.o datecalc.o fileutils.o generic.o +OBJECTS = Buffer.o Exceptions.o Handle.o Image.o Input.o Main.o Output.o \ + String.o checkargs.o datecalc.o fileutils.o generic.o +TARGET = Baltisot-sol.a -all: Baltisot-sol.dll +all: $(TARGET) -Baltisot-sol.dll: $(OBJECTS) - $(CXX) -o Baltisot-sol.dll -shared $(OBJECTS) -lz +$(TARGET): $(OBJECTS) + $(AR) r Baltisot-sol.a $(OBJECTS) + $(RANLIB) Baltisot-sol.a clean: - rm -f *.o + rm -f *.o $(TARGET) diff --git a/lib/Output.cc b/lib/Output.cc index 1ebf6db..99fff7a 100644 --- a/lib/Output.cc +++ b/lib/Output.cc @@ -1,13 +1,14 @@ #include <stdio.h> -#include <unistd.h> #include <string.h> #include <errno.h> #include <sys/types.h> #include <sys/stat.h> -#include <fcntl.h> #ifdef HAVE_CONFIG_H #include "config.h" #endif +#ifdef HAVE_FCNTL_H +#include <fcntl.h> +#endif #include "Output.h" #include "Exceptions.h" #include "gettext.h" diff --git a/lib/fileutils.cc b/lib/fileutils.cc index b04a414..6e3ef17 100644 --- a/lib/fileutils.cc +++ b/lib/fileutils.cc @@ -21,7 +21,12 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#ifdef HAVE_UNISTD_H #include <unistd.h> +#endif #include "generic.h" unsigned long filesize(int f_iso) diff --git a/lib/generic.cc b/lib/generic.cc index 357779f..0eb5bb2 100644 --- a/lib/generic.cc +++ b/lib/generic.cc @@ -19,7 +19,9 @@ #include <stdio.h> #include <stdarg.h> - +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "String.h" char verbosity = 0; |