MAKE    = make.exe
CC      = gcc.exe
WINDRES = windres.exe
DEL     = del
UPX     = upx.exe

SOURCE  = windos.c dos.c x86.c
HEADER  = windos.h
RES     = windos_res.o

default : Makefile windos.exe

clean : Makefile
	$(DEL) $(RES)

src_only : Makefile
	$(MAKE) clean
	$(DEL) windos.exe
	$(DEL) windos_upx.exe

upx : Makefile windos.exe
	$(UPX) -o windos_upx.exe windos.exe

# t@CK
windos.exe : $(SOURCE) $(HEADER) $(RES) Makefile
	$(CC) -o windos.exe $(SOURCE) windos_res.o

windos_res.o : res/windos.rc Makefile
	$(WINDRES) -o $(RES) res/windos.rc
