27 lines
556 B
Makefile
27 lines
556 B
Makefile
CC=gcc
|
|
LD=ld
|
|
CFLAGS=-g3
|
|
CFILES=parslib.c strings.c
|
|
TEST_FILES=test.c
|
|
OUTPUT=parslib.o
|
|
TOUTPUT=test
|
|
LOUTPUT=parslib.final.o
|
|
|
|
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
|
|
$(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)
|
|
|
|
run:
|
|
./$(OUTPUT)
|
|
|
|
clean:
|
|
rm -rf *.o $(TOUTPUT) $(OUTPUT) $(LOUTPUT)
|