Add clean target to Makefile, started using pkg-config

This commit is contained in:
j4nk 2023-08-13 21:37:34 -04:00
parent 98f8e3d962
commit 40c7712990
1 changed files with 6 additions and 3 deletions

View File

@ -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