compiler/Makefile
sjs 3f070cd0db [NEW] Emit x86 code for the mov instruction. Barely works 1/2 the time.
The supporting infrastructure includes a C program for reading a
binary blob of x86 code and wrapping it in an ELF executable for Linux
x86.  Unsure about getting the data for other sections of the binary
besides .text.
2009-05-19 17:01:14 -07:00

22 lines
425 B
Makefile

build: test.rb test.code
ruby test.rb test.code
nasm -f elf -g -o test.o test.asm
ld -o test test.o
# $? indicates success as per unix convention
./test
elfwriter: elfwriter.c
gcc -o elfwriter elfwriter.c -lelf
test_elf: elfwriter build
./elfwriter test.bin 4 test_elf.o
ld -o test_elf test_elf.o
./test_elf
clean:
@rm -f test.o
@rm -f test
@rm -f test.asm
@rm -f elfwriter
@rm -f test_elf.o
@rm -f test_elf