summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpixel <pixel>2008-08-06 13:21:29 +0000
committerpixel <pixel>2008-08-06 13:21:29 +0000
commitdffe2a032c57d4e00ae82a5c6ac70093566936bf (patch)
tree41b394c1d2132b27fb44a11241163693261146e9
parent21cfea2b52c2d2003506116798d0449844a113f3 (diff)
Updating win32 compilation process.
-rw-r--r--Makefile.mingw3210
1 files changed, 5 insertions, 5 deletions
diff --git a/Makefile.mingw32 b/Makefile.mingw32
index c210a45..41fdcba 100644
--- a/Makefile.mingw32
+++ b/Makefile.mingw32
@@ -2,8 +2,8 @@ CC = i586-mingw32msvc-gcc
LD = i586-mingw32msvc-gcc
AR = i586-mingw32msvc-ar rcs
-CPPFLAGS = -g -Wall -Werror -D_FILE_OFFSET_BITS=64 -I. -I ../zlib-win32/include
-LDFLAGS = -g -lz
+CPPFLAGS = -g -Wall -Werror -D_FILE_OFFSET_BITS=64 -I. -I ../gnuwin32/include
+LDFLAGS = -g -L../gnuwin32/lib
SOURCE_LIST = \
MPQCryptography.c \
@@ -19,7 +19,7 @@ mpq-fs.c \
mpq-misc.c \
-TARGET = mpqlib.a
+TARGET = mpqlib.dll
OBJ_LIST = $(addsuffix .o, $(notdir $(basename $(SOURCE_LIST))))
@@ -28,13 +28,13 @@ DEP_LIST = $(addsuffix .dep, $(notdir $(basename $(SOURCE_LIST))))
all: dep $(TARGET)
$(TARGET): $(OBJ_LIST)
- $(AR) $@ $(OBJ_LIST)
+ $(LD) -shared -Wl,--output-def=mpqlib.def -Wl,--out-implib=mpqlib.a -o mpqlib.dll $(OBJ_LIST) -g -fexceptions -Wl,--enable-auto-image-base -Wl,--export-dynamic --export-all-symbols -Wl,--enable-auto-import -fexceptions -lz.dll $(LDFLAGS)
test-it.exe: $(TARGET) test-it.o
$(LD) -o test-it.exe test-it.o $(TARGET) $(LDFLAGS)
clean:
- rm -f *.o *.dep $(TARGET) test-it.exe
+ rm -f *.o *.dep $(TARGET) test-it.exe *.dll *.a
dep: $(DEP_LIST)