#
# Makefile (w32 --ak)
#
OPTIMIZE = -O2

CFLAGS=-nologo -favor:blend -MT $(OPTIMIZE) -DWIN32=1 -D_CRT_SECURE_NO_DEPRECATE \
-DHAVE_CONFIG_H -I. -I.. -I../lib
CC=cl

OBJS=getopt.obj getopt1.obj paperconf-paperconf.obj
LIBS=../lib/libpaper.lib

paperconf.exe: $(OBJS) $(LIBS)
	$(CC) -Fe$@ $(OBJS) $(LIBS)

getopt.obj: getopt.c getopt.h
	$(CC) -c $(CFLAGS) -Fo$@ getopt.c

getopt1.obj: getopt1.c getopt.h
	$(CC) -c $(CFLAGS) -Fo$@ getopt1.c

paperconf-paperconf.obj: paperconf.c ../config.h ../lib/paper.h ./getopt.h
	$(CC) -c $(CFLAGS) -Fo$@ paperconf.c

clean::
	rm -f *~ *.obj *.exe
