#
# Makefile
#
# Win32 API behavior test cases
#

default: all

CC=gcc
CFLAGS=-Wall -mno-cygwin #-Wl,--subsystem=windows

TARGETS =
#TARGETS+= exceptions.exe filemap.exe unwind.exe callwindowproc.exe
#TARGETS+= console_control.exe console_behavior.exe stack_guard.exe
#TARGETS+= fibers.exe exceptions_unwind.exe
TARGETS+= stktst.dll exceptions_unwind2.exe

all: $(TARGETS)

%.exe: %.c
	$(CC) $(CFLAGS) -o $@ $<

%.dll: %.c
	$(CC) $(CFLAGS) -shared -o $@ $< -Wl,--output-def,$(patsubst %.c,%.def,$<),--out-implib,lib$(patsubst %.c,%.a,$<)

exceptions_unwind2.exe: exceptions_unwind2.c stktst.dll
	$(CC) $(CFLAGS) -o $@ $< -L. -lstktst

#
# EOF
#
