mirror of
https://github.com/CPunch/Cosmo.git
synced 2024-12-22 14:30:05 +00:00
CPunch
9537a2c7b8
- now takes command line arguments: Usage: ./bin/cosmo [-clsr] [args] available options are: -c <in> <out> compile <in> and dump to <out> -l <in> load dump from <in> -s <in...> compile and run <in...> script(s) -r start the repl
53 lines
745 B
Makefile
53 lines
745 B
Makefile
# make clean && make && ./bin/cosmo
|
|
|
|
CC=clang
|
|
CFLAGS=-fPIE -Wall -O3 -Isrc -std=c99
|
|
LDFLAGS=-lm #-fsanitize=address
|
|
OUT=bin/cosmo
|
|
|
|
CHDR=\
|
|
src/cchunk.h\
|
|
src/cdebug.h\
|
|
src/clex.h\
|
|
src/cmem.h\
|
|
src/coperators.h\
|
|
src/cosmo.h\
|
|
src/cparse.h\
|
|
src/cstate.h\
|
|
src/cvalue.h\
|
|
src/ctable.h\
|
|
src/cvm.h\
|
|
src/cobj.h\
|
|
src/cbaselib.h\
|
|
src/cdump.h\
|
|
src/cundump.h\
|
|
|
|
CSRC=\
|
|
src/cchunk.c\
|
|
src/cdebug.c\
|
|
src/clex.c\
|
|
src/cmem.c\
|
|
src/coperators.c\
|
|
src/cparse.c\
|
|
src/cstate.c\
|
|
src/cvalue.c\
|
|
src/ctable.c\
|
|
src/cvm.c\
|
|
src/cobj.c\
|
|
src/cbaselib.c\
|
|
src/cdump.c\
|
|
src/cundump.c\
|
|
main.c\
|
|
|
|
COBJ=$(CSRC:.c=.o)
|
|
|
|
.c.o:
|
|
$(CC) -c $(CFLAGS) $< -o $@
|
|
|
|
$(OUT): $(COBJ) $(CHDR)
|
|
mkdir -p bin
|
|
$(CC) $(COBJ) $(LDFLAGS) -o $(OUT)
|
|
|
|
clean:
|
|
rm -rf $(COBJ) $(OUT)
|