# Makefile for ld stackdump with def file testcase

CFLAGS = -O2 -Wall
LDFLAGS = -s

all: cygtestcase.dll

testcase.o: testcase.c
	gcc -c ${CFLAGS} $< -o $@ 

testcase.def: testcase.o
	dlltool -z $@ --export-all-symbols $<

cygtestcase.dll: testcase.o testcase.def
	gcc -shared $+ ${LDFLAGS} -o $@

clean:
	rm -f *.o *.def *.a *.dll *.exe \#* *~ *.stackdump
