From 386a929bf551fd4f05cf7f81a391559a2592cb97 Mon Sep 17 00:00:00 2001 From: iamcheeseman Date: Tue, 3 Mar 2026 17:02:48 -0500 Subject: replace tsarc with a c program --- Makefile | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b7bff75..8ab4f97 100644 --- a/Makefile +++ b/Makefile @@ -1,32 +1,39 @@ CC=cc -CFLAGS+=-std=c99 -pedantic -Wall -Wextra -O2 -I/usr/include/freetype2 +CFLAGS+=-std=c99 -pedantic -Wall -Wextra -O2 LDFLAGS+=-lX11 -lXft INSTALL=/usr/local/bin -TSAR_OUT=tsarbar +TSARBAR_OUT=tsarbar +TSARC_OUT=tsarc -HEADERS=src/pipe.h src/bardata.h -SRC=src/tsar.c src/pipe.c src/bardata.c +TSARBAR_SRC=src/tsar.c src/pipe.c src/bardata.c +TSARC_SRC=src/tsarc.c -.PHONY: default run clean +.PHONY: default all run clean install uninstall -default: $(TSAR_OUT) +default: all + +all: $(TSARBAR_OUT) $(TSARC_OUT) # Project should be small enough that we should be able to ignore incremental # compilation -$(TSAR_OUT): $(SRC) - $(CC) $(SRC) -o $(TSAR_OUT) $(CFLAGS) $(LDFLAGS) +$(TSARBAR_OUT): $(TSARBAR_SRC) + $(CC) $(TSARBAR_SRC) -o $(TSARBAR_OUT) $(CFLAGS) -I/usr/include/freetype2 $(LDFLAGS) + +$(TSARC_OUT): $(TSARC_SRC) + $(CC) $(TSARC_SRC) -o $(TSARC_OUT) $(CFLAGS) %.c: -run: $(TSAR_OUT) - ./$(TSAR_OUT) +run: $(TSARBAR_OUT) + ./$(TSARBAR_OUT) clean: - rm $(TSAR_OUT) + rm $(TSARBAR_OUT) + rm $(TSARC_OUT) -install: $(TSAR_OUT) +install: all cp tsarbar $(INSTALL)/tsarbar cp tsarc $(INSTALL)/tsarc -- cgit v1.3-2-g0d8e