shell-scape: Échappe des caractères spéciaux

This commit is contained in:
2022-12-01 08:10:56 +01:00
parent 27eafc7b9c
commit d1d8771348
7 changed files with 102 additions and 0 deletions

25
shell-escape/Makefile Normal file
View File

@@ -0,0 +1,25 @@
CC := gcc
CFLAGS := -Wall -Wextra
CPPFLAGS := -isystemthird-party
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/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