39 lines
1.1 KiB
Makefile
39 lines
1.1 KiB
Makefile
#--------------------------------------------------------------------#
|
|
# @date 2018-05-21 #
|
|
# #
|
|
# Feedback Arc Set: An algorithm which removes cycles in a directed #
|
|
# graph by removing the least amount of edges possible. #
|
|
#--------------------------------------------------------------------#
|
|
|
|
CC = gcc
|
|
CFLAGS = -std=c99 -pedantic -Wall -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE -D_POSIX_C_SOURCE=200809L -g -c
|
|
LDFLAGS = -lrt -lpthread
|
|
|
|
.PHONY: all clean docs docs_clean archive archive_clean
|
|
|
|
all: supervisor generator
|
|
|
|
supervisor: supervisor.o
|
|
$(CC) $(LDFLAGS) $^ -o $@
|
|
|
|
generator: generator.o
|
|
$(CC) $(LDFLAGS) $^ -o $@
|
|
|
|
%.o: %.c common.h
|
|
$(CC) $(CFLAGS) $^
|
|
|
|
docs: Doxyfile supervisor.c generator.c common.h
|
|
doxygen Doxyfile
|
|
|
|
archive: Doxyfile supervisor.c generator.c common.h
|
|
tar -czvf exercise3.tgz $^
|
|
|
|
clean:
|
|
rm -f supervisor.o supervisor generator.o generator common.h.gch
|
|
|
|
docs_clean:
|
|
rm -rf html
|
|
|
|
archive_clean:
|
|
rm -f exercise3.tgz
|