# Mingw Makefile for building libq

CC = gcc

CFLAGS = -O3

LDFLAGS =

CCFLAGS = $(CFLAGS) $(CPPFLAGS) $(DEFS) -DUSE_THREADS -I. -I../src

.SUFFIXES	: .c .h .o

.PHONY: all clean distclean

all: libq.dll libq.lib

.c.o:
	$(CC) -c $(CCFLAGS) -I. $<

libq.dll: libq.o libq.def
	dllwrap --dllname=libq.dll --output-lib=libq.a --def=libq.def libq.o

libq.def: libq.o
	dlltool --dllname=libq.dll --output-def=libq.def libq.o

# build the msc libq import lib (needs MS LIB program)

libq.lib: libq.def
	lib /def:libq.def /out:libq.lib /machine:ix86

clean:
	rm -f *.o *.obj *.a *.lib *.dll *.def *.exp

distclean: clean
	rm -f TAGS


syntax highlighted by Code2HTML, v. 0.9.1