parslib/Makefile

27 lines
556 B
Makefile
Raw Permalink Normal View History

2024-08-15 23:12:06 +00:00
CC=gcc
2024-09-09 18:55:21 +00:00
LD=ld
2024-08-15 23:12:06 +00:00
CFLAGS=-g3
2024-09-04 09:04:08 +00:00
CFILES=parslib.c strings.c
TEST_FILES=test.c
OUTPUT=parslib.o
TOUTPUT=test
2024-09-09 18:55:21 +00:00
LOUTPUT=parslib.final.o
2024-08-15 23:12:06 +00:00
all: $(FILES)
$(CC) -c $(CFLAGS) -o parslib.o parslib.c
$(CC) -c $(CFLAGS) -o strings.o strings.c
$(CC) -c $(CFLAGS) -o streecmp/streecmp.o streecmp/streecmp.c
2024-09-09 18:55:21 +00:00
$(LD) -relocatable -o $(LOUTPUT) parslib.o strings.o streecmp/streecmp.o
test: all
$(CC) $(CFLAGS) $(TEST_FILES) parslib.o strings.o streecmp/streecmp.o -o $(TOUTPUT)
run_test:
./$(TOUTPUT)
2024-08-15 23:12:06 +00:00
run:
./$(OUTPUT)
clean:
2024-09-09 18:55:21 +00:00
rm -rf *.o $(TOUTPUT) $(OUTPUT) $(LOUTPUT)