# use 'vmake' (not 'make'!) to run this script!

# set this to where Cybiko SDK actually resides
#CYBIKO_SDK = C:\Program Files\Cybiko Inc\Cybiko SDK

# you may also want to change this...
NAME = yopu

PP = "$(CYBIKO_SDK)"/bin/vcpp
CC = "$(CYBIKO_SDK)"/bin/vcc1
AS = "$(CYBIKO_SDK)"/bin/vas
LD = "$(CYBIKO_SDK)"/bin/filer
RM = "$(CYBIKO_SDK)\bin\vrm"

all : yopu-yopu.app

$(NAME).c : CybikoPlayer.c
	@touch $(NAME).c

# You must add to archive "$(CYBIKO_SDK)"/lib/main.e ,
# your bytecode and application resources
# (*.pic better place first).
# *.spl - splash screen.
# *.help - help file.
# *.inf - information for programm manager.
# For more details see filer.exe manual.
yopu-yopu.app : tmp/bytecode.bin
    @echo building app archive...
    @$(LD) a $@ @res/filer.list tmp/bytecode.bin "$(CYBIKO_SDK)"/lib/main.e 

# For more details see preprocessor manual.
tmp/$(NAME).pp : src/$(NAME).c
    @echo preprocessing...
    @$(PP) -I"$(CYBIKO_SDK)"/inc src/$(NAME).c $@

# For more details see compiler manual.
tmp/$(NAME).asm : tmp/$(NAME).pp
    @echo compiling...
    @$(CC) tmp/$(NAME).pp -o $@

# For more details see assembler manual.
tmp/bytecode.bin : tmp/$(NAME).asm
    @echo assembling...
    @$(AS) tmp/$(NAME).asm -o $@

clean :
    @echo cleaning...
    @+$(RM) -f tmp\*.* 

new : clean all
