# *********************************************************************
# FASM Complier MAKEFILE
# Author:Kenneth Zheng
# Date: June 08th, 2007
# Notice:
# $@ ==The destination file
# $* ==The destination file but except extended name
# $? ==All of source files
# $< ==Source file that it only used for the hidden rules.
# *********************************************************************
NAME=template3
FILE_FORMAT=EXE
ALL:\
        stub.exe \
        $(NAME).$(FILE_FORMAT)

stub.exe: stub.asm
	fasm stub.asm

$(NAME).$(FILE_FORMAT): $(NAME).asm 
	fasm.exe $(NAME).asm
        upx.exe -9 -v $(NAME).$(FILE_FORMAT)
        
.asm.$(FILE_FORMAT):
        fasm.exe $< $@

clean:
        del stub.exe
        del $(NAME).$(FILE_FORMAT)
