You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
564 B

CC := gcc
CFLAGS := -Wall -Wextra
CPPFLAGS := -isystemoki-packages/static-string-builder/src
all: test
test: testEscape
./testEscape
testEscape: build/escape.o build/testEscape.o ../static-string-builder/build/builder.o
$(CC) -o $@ $^
build/escape.o: src/escape.c src/escape.h | build
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@
build/escape.a: build/escape.o
ar rcs $@ $^
build/testEscape.o: test/testEscape.c src/escape.h | build
$(CC) $(CPPFLAGS) $(CFLAGS) -Isrc/ -c $< -o $@
build:
mkdir build
clean:
rm -rf testEscape build
.PHONY: all test clean