summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpixel <pixel>2008-08-04 15:57:25 +0000
committerpixel <pixel>2008-08-04 15:57:25 +0000
commit8288e5164e6b18a756c8c0149fe399e795e1add7 (patch)
treee0af603b57e089eea51b214e0509f27fdcb17f7c
parent6da6e26e2f0a7dfd607846ab1b7a85fddc6a729f (diff)
Adding a Makefile for mingw32
-rw-r--r--Makefile.mingw3244
1 files changed, 44 insertions, 0 deletions
diff --git a/Makefile.mingw32 b/Makefile.mingw32
new file mode 100644
index 0000000..c210a45
--- /dev/null
+++ b/Makefile.mingw32
@@ -0,0 +1,44 @@
+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
+
+SOURCE_LIST = \
+MPQCryptography.c \
+errors.c \
+extract.c \
+lookupa.c \
+hashtab.c \
+recycle.c \
+mpq-bios.c \
+mpq-errors.c \
+mpq-file.c \
+mpq-fs.c \
+mpq-misc.c \
+
+
+TARGET = mpqlib.a
+
+
+OBJ_LIST = $(addsuffix .o, $(notdir $(basename $(SOURCE_LIST))))
+DEP_LIST = $(addsuffix .dep, $(notdir $(basename $(SOURCE_LIST))))
+
+all: dep $(TARGET)
+
+$(TARGET): $(OBJ_LIST)
+ $(AR) $@ $(OBJ_LIST)
+
+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
+
+dep: $(DEP_LIST)
+
+%.dep : %.c
+ $(CC) $(CPPFLAGS) -M -MF $@ $<
+
+-include $(DEP_LIST)