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
|
2024-09-04 18:35:50 +00:00
|
|
|
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
|
|
|
|
2024-09-04 18:35:50 +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
|
2024-09-04 18:35:50 +00:00
|
|
|
|
|
|
|
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)
|