CC = bcc
CFLAGS = -v -Md -ansi -O
LD = ld86
LDFLAGS = -y -d -T100 -0 -L/usr/lib/bcc -C0

hello_c.bin: hello_c.o __cstartup.o
	$(LD) $(LDFLAGS) -o hello_c.bin hello_c.o __cstartup.o 

hello_c.o: hello_c.c

__cstartup.o: __cstartup.asm
	nasm -f as86 -o __cstartup.o __cstartup.asm

clean:
	rm -rf hello_c.bin hello_c.o __cstartup.o
