From 40c7712990a7c884ddd8e1e75eb1d6f91d3eb4bc Mon Sep 17 00:00:00 2001 From: j4nk Date: Sun, 13 Aug 2023 21:37:34 -0400 Subject: [PATCH] Add clean target to Makefile, started using pkg-config --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0ca3fcd..98dde40 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,9 @@ CC=gcc -CLIB=-L/usr/local/lib -llua5.3 -INC=-I/usr/local/include +CLIB=`pkg-config --libs lua5.3` +INC= BIN=open_card_table DEBUG=-g -CFLAGS=-D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE +CFLAGS=`pkg-config --cflags lua5.3` -D_XOPEN_SOURCE=700 -D_DEFAULT_SOURCE open_card_table: main.o oct_networking.o oct_termbox_sprite.o oct_log.o $(CC) $(DEBUG) $(CFLAGS) $(INC) $(CLIB) -o $(BIN) $^ @@ -13,3 +13,6 @@ open_card_table: main.o oct_networking.o oct_termbox_sprite.o oct_log.o test: $(CC) $(CFLAGS) $(INC) $(CLIB) test.c -o test $(DEBUG) +clean: + rm -f open_card_table + rm -f *.o