aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-01-20 23:00:39 +0100
committerdec05eba <dec05eba@protonmail.com>2020-01-20 23:00:39 +0100
commit108018e3e7326dabbbef568ab08bc5cebf5d427b (patch)
tree7c9a522276aea7015638492592eba02615b78d43 /Makefile
parent50c928d224bff0af322f23a7d2b842cd54aa2e68 (diff)
Add arithmetic, implement hash map
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 13 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index e19c75e..399128b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,10 @@
-CFLAGS = -Wall -Wextra -g3 -ansi -pedantic
-OBJ = build/main.o build/tokenizer.o build/parser.o build/bytecode.o build/buffer.o
+CFLAGS = -Wall -Wextra -g3 -ansi -pedantic -fPIE
+LIBS = -Wl,-Bdynamic -lcurl
+OBJ = build/main.o build/tokenizer.o build/parser.o build/bytecode.o build/buffer.o build/hash_map.o
+CC = cc
all: build_dir $(OBJ)
- cc -o build/tsl $(OBJ) -fPIE
+ $(CC) -o build/tsl $(OBJ) $(LIBS)
clean:
rm $(OBJ) build/tsl
@@ -14,16 +16,19 @@ compiledb:
make clean; bear make
build/main.o: src/main.c include/tokenizer.h
- cc -c src/main.c -o build/main.o $(CFLAGS)
+ $(CC) -c src/main.c -o build/main.o $(CFLAGS)
build/tokenizer.o: src/tokenizer.c include/tokenizer.h
- cc -c src/tokenizer.c -o build/tokenizer.o $(CFLAGS)
+ $(CC) -c src/tokenizer.c -o build/tokenizer.o $(CFLAGS)
build/parser.o: src/parser.c include/parser.h
- cc -c src/parser.c -o build/parser.o $(CFLAGS)
+ $(CC) -c src/parser.c -o build/parser.o $(CFLAGS)
build/bytecode.o: src/bytecode.c include/bytecode.h
- cc -c src/bytecode.c -o build/bytecode.o $(CFLAGS)
+ $(CC) -c src/bytecode.c -o build/bytecode.o $(CFLAGS)
build/buffer.o: src/std/buffer.c include/std/buffer.h
- cc -c src/std/buffer.c -o build/buffer.o $(CFLAGS)
+ $(CC) -c src/std/buffer.c -o build/buffer.o $(CFLAGS)
+
+build/hash_map.o: src/std/hash_map.c include/std/hash_map.h
+ $(CC) -c src/std/hash_map.c -o build/hash_map.o $(CFLAGS)