Files
big-bad-num/Makefile
2026-01-20 20:07:49 -08:00

24 lines
499 B
Makefile

CC=gcc
CFLAGS=-std=c11 -Wall -Wpedantic -Iinclude/ -g
LD=gcc
LDFLAGS=-shared -fPIC
TEST_CFLAGS=-std=c11 -Wall -Wpedantic -Iinclude/ -g
TEST_LDFLAGS=-L. -lbbn
libbbn.so: src/bbn.c include/bbn.h
$(CC) $(CFLAGS) -c -o bbn.o src/bbn.c
$(LD) $(LDFLAGS) -o $@ bbn.o
test: test/test
test/test
test/test: test/main.c libbbn.so
$(CC) $(TEST_CFLAGS) -c -o test/main.o test/main.c
$(LD) $(TEST_LDFLAGS) -o test/test test/main.o
clean:
rm -f libbbn.so bbn.o test/test test/main.o
.PHONY: test clean