23 lines
637 B
Bash
Executable File
23 lines
637 B
Bash
Executable File
#!/bin/bash
|
|
|
|
code=$PWD
|
|
opts=-g
|
|
inc="-I$code/symbol_set"
|
|
|
|
mkdir -p build
|
|
cd build
|
|
|
|
if [[ "$1" == "" ]]; then
|
|
clang -c $code/examples/example1.c $opts $inc
|
|
./symbol_set.ld_meta example1.o
|
|
clang -o example1 $code/examples/example1.c $opts $inc -T sy.ld
|
|
elif [[ "$1" == "stack_machine" ]]; then
|
|
clang -c $code/examples/stack_machine.c $opts $inc
|
|
./symbol_set.ld_meta stack_machine.o
|
|
clang -o stack_machine $code/examples/stack_machine.c $opts $inc -T sy.ld
|
|
elif [[ "$1" == "hooks" ]]; then
|
|
clang -c $code/examples/hooks.c $opts $inc
|
|
./symbol_set.ld_meta hooks.o
|
|
clang -o hooks $code/examples/hooks.c $opts $inc -T sy.ld
|
|
fi
|