MOPTS = -mwin32 -m32 -mwindows -mno-cygwin
CFLAGS = ${MOPTS} -O2
CPPFLAGS = ${CFLAGS}
LDFLAGS = ${MOPTS} -Wl,--strip-all
PROG = sws.exe
OBJS = sws.o sws.res
LIBS = -lstdc++ -lwininet

.SUFFIXES:
.SUFFIXES: .cpp .o .rc .res

.rc.res:
	windres --output-format=coff --input=$< --output=$@

all: ${PROG}

${PROG}: ${OBJS}
	gcc ${LDFLAGS} -o $@ ${OBJS} ${LIBS}

${OBJS}: define.h

clean:
	@rm -f *.o *.res *~
