# $Id$
CC = wcc386 -bt=nt -q
LD = wlink option quiet

CFLAGS = -i=include -d_MILSKO -dUSE_GDI -dUSE_STB_TRUETYPE -dUSE_STB_IMAGE -dSTBI_NO_SIMD
LDFLAGS = system nt_dll
all: src/Mw.dll
clean: .SYMBOLIC
	%erase src/core.obj
	%erase src/string.obj
	%erase src/draw.obj
	%erase src/default.obj
	%erase src/filechooser.obj
	%erase src/lowlevel.obj
	%erase src/error.obj
	%erase src/unicode.obj
	%erase src/color.obj
	%erase src/directory.obj
	%erase src/messagebox.obj
	%erase external/ds.obj
	%erase external/image.obj
	%erase external/truetype.obj
	%erase src/icon/info.obj
	%erase src/icon/note.obj
	%erase src/icon/warning.obj
	%erase src/icon/error.obj
	%erase src/icon/news.obj
	%erase src/icon/question.obj
	%erase src/icon/directory.obj
	%erase src/icon/file.obj
	%erase src/icon/back.obj
	%erase src/icon/forward.obj
	%erase src/icon/up.obj
	%erase src/icon/computer.obj
	%erase src/icon/search.obj
	%erase src/cursor/default.obj
	%erase src/cursor/cross.obj
	%erase src/cursor/text.obj
	%erase src/cursor/hidden.obj
	%erase src/widget/button.obj
	%erase src/widget/frame.obj
	%erase src/widget/opengl.obj
	%erase src/widget/window.obj
	%erase src/widget/menu.obj
	%erase src/widget/entry.obj
	%erase src/widget/submenu.obj
	%erase src/widget/viewport.obj
	%erase src/widget/image.obj
	%erase src/widget/scrollbar.obj
	%erase src/widget/checkbox.obj
	%erase src/widget/label.obj
	%erase src/widget/listbox.obj
	%erase src/widget/numberentry.obj
	%erase src/text/font.obj
	%erase src/text/draw.obj
	%erase src/text/boldfont.obj
	%erase src/text/ttf.obj
	%erase src/text/boldttf.obj
	%erase src/backend/gdi.obj
	%erase src/Mw.dll

src/Mw.dll:  src/core.obj src/string.obj src/draw.obj src/default.obj src/filechooser.obj src/lowlevel.obj src/error.obj src/unicode.obj src/color.obj src/directory.obj src/messagebox.obj external/ds.obj external/image.obj external/truetype.obj src/icon/info.obj src/icon/note.obj src/icon/warning.obj src/icon/error.obj src/icon/news.obj src/icon/question.obj src/icon/directory.obj src/icon/file.obj src/icon/back.obj src/icon/forward.obj src/icon/up.obj src/icon/computer.obj src/icon/search.obj src/cursor/default.obj src/cursor/cross.obj src/cursor/text.obj src/cursor/hidden.obj src/widget/button.obj src/widget/frame.obj src/widget/opengl.obj src/widget/window.obj src/widget/menu.obj src/widget/entry.obj src/widget/submenu.obj src/widget/viewport.obj src/widget/image.obj src/widget/scrollbar.obj src/widget/checkbox.obj src/widget/label.obj src/widget/listbox.obj src/widget/numberentry.obj src/text/font.obj src/text/draw.obj src/text/boldfont.obj src/text/ttf.obj src/text/boldttf.obj src/backend/gdi.obj
	$(LD) $(LDFLAGS) option implib=src/Mw.lib name $@  file src/core.obj file src/string.obj file src/draw.obj file src/default.obj file src/filechooser.obj file src/lowlevel.obj file src/error.obj file src/unicode.obj file src/color.obj file src/directory.obj file src/messagebox.obj file external/ds.obj file external/image.obj file external/truetype.obj file src/icon/info.obj file src/icon/note.obj file src/icon/warning.obj file src/icon/error.obj file src/icon/news.obj file src/icon/question.obj file src/icon/directory.obj file src/icon/file.obj file src/icon/back.obj file src/icon/forward.obj file src/icon/up.obj file src/icon/computer.obj file src/icon/search.obj file src/cursor/default.obj file src/cursor/cross.obj file src/cursor/text.obj file src/cursor/hidden.obj file src/widget/button.obj file src/widget/frame.obj file src/widget/opengl.obj file src/widget/window.obj file src/widget/menu.obj file src/widget/entry.obj file src/widget/submenu.obj file src/widget/viewport.obj file src/widget/image.obj file src/widget/scrollbar.obj file src/widget/checkbox.obj file src/widget/label.obj file src/widget/listbox.obj file src/widget/numberentry.obj file src/text/font.obj file src/text/draw.obj file src/text/boldfont.obj file src/text/ttf.obj file src/text/boldttf.obj file src/backend/gdi.obj library clib3r.lib library opengl32.lib library gdi32.lib library user32.lib
	


src/core.obj: src/core.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/string.obj: src/string.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/draw.obj: src/draw.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/default.obj: src/default.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/filechooser.obj: src/filechooser.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/lowlevel.obj: src/lowlevel.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/error.obj: src/error.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/unicode.obj: src/unicode.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/color.obj: src/color.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/directory.obj: src/directory.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/messagebox.obj: src/messagebox.c
	$(CC) $(CFLAGS) -fo=$@ $<
external/ds.obj: external/ds.c
	$(CC) $(CFLAGS) -fo=$@ $<
external/image.obj: external/image.c
	$(CC) $(CFLAGS) -fo=$@ $<
external/truetype.obj: external/truetype.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/icon/info.obj: src/icon/info.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/icon/note.obj: src/icon/note.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/icon/warning.obj: src/icon/warning.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/icon/error.obj: src/icon/error.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/icon/news.obj: src/icon/news.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/icon/question.obj: src/icon/question.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/icon/directory.obj: src/icon/directory.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/icon/file.obj: src/icon/file.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/icon/back.obj: src/icon/back.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/icon/forward.obj: src/icon/forward.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/icon/up.obj: src/icon/up.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/icon/computer.obj: src/icon/computer.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/icon/search.obj: src/icon/search.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/cursor/default.obj: src/cursor/default.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/cursor/cross.obj: src/cursor/cross.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/cursor/text.obj: src/cursor/text.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/cursor/hidden.obj: src/cursor/hidden.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/widget/button.obj: src/widget/button.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/widget/frame.obj: src/widget/frame.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/widget/opengl.obj: src/widget/opengl.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/widget/window.obj: src/widget/window.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/widget/menu.obj: src/widget/menu.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/widget/entry.obj: src/widget/entry.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/widget/submenu.obj: src/widget/submenu.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/widget/viewport.obj: src/widget/viewport.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/widget/image.obj: src/widget/image.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/widget/scrollbar.obj: src/widget/scrollbar.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/widget/checkbox.obj: src/widget/checkbox.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/widget/label.obj: src/widget/label.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/widget/listbox.obj: src/widget/listbox.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/widget/numberentry.obj: src/widget/numberentry.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/text/font.obj: src/text/font.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/text/draw.obj: src/text/draw.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/text/boldfont.obj: src/text/boldfont.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/text/ttf.obj: src/text/ttf.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/text/boldttf.obj: src/text/boldttf.c
	$(CC) $(CFLAGS) -fo=$@ $<
src/backend/gdi.obj: src/backend/gdi.c
	$(CC) $(CFLAGS) -fo=$@ $<
