diff options
-rw-r--r-- | Makefile.mingw32 | 44 |
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) |