From e9effb5d43946232df5717d123f173a3d4a1b804 Mon Sep 17 00:00:00 2001 From: emma Date: Wed, 30 Aug 2023 18:50:37 -0600 Subject: [PATCH] Makefile: stopped linking true and false to yac.so --- Makefile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index d16e06c..2e01c79 100644 --- a/Makefile +++ b/Makefile @@ -8,27 +8,26 @@ .POSIX: PREFIX=/usr/local -CFLAGS=-O3 -s -Wl,-z,noseparate-code,-z,nosectionheader -flto -Lbuild -lyac +CFLAGS=-O3 -s -Wl,-z,noseparate-code,-z,nosectionheader -flto -Lbuild build: build_dir cat false tail true - rm build/yac.o clean: build_dir rm -rf build/ -cat: build_dir lib - cc $(CFLAGS) -o build/cat src/cat.c +cat: src/cat.c build_dir lib + cc $(CFLAGS) -lyac -o build/cat src/cat.c -false: build_dir lib +false: src/false.c build_dir cc $(CFLAGS) -o build/false src/false.c -tail: build_dir lib - cc $(CFLAGS) -o build/tail src/tail.c +tail: src/tail.c build_dir lib + cc $(CFLAGS) -lyac -o build/tail src/tail.c -true: build_dir lib +true: src/true.c build_dir cc $(CFLAGS) -o build/true src/true.c -lib: +lib: src/yac.c src/yac.h cc $(CFLAGS) -c -fPIC -o build/yac.o src/yac.c cc -shared -o build/libyac.so build/yac.o @@ -36,6 +35,7 @@ build_dir: mkdir -p build install: build + rm build/*.o mkdir -p $(PREFIX)/lib $(PREFIX)/bin cp -f build/*.so $(PREFIX)/lib/ cp -f build/* $(PREFIX)/bin/