This repository has been archived on 2024-05-05. You can view files and clone it, but cannot push or open issues or pull requests.
work-stealing-scheduler/Makefile

55 lines
1 KiB
Makefile
Raw Permalink Normal View History

2024-03-15 12:19:51 +01:00
CC = gcc
RM = rm -rf
TAR = tar -cf
CP = cp -r
MKDIR = mkdir -p
SRC_DIR = src
INC_DIR = includes
SOURCES = $(wildcard $(SRC_DIR)/*.c)
OBJETS = $(patsubst %.c,%.o,$(notdir $(SOURCES)))
CFLAGS = -std=gnu11 -pedantic
LDFLAGS =
2024-03-15 12:32:26 +01:00
EXE = ordonnanceur
2024-03-26 20:50:32 +01:00
EXE_EXT = .elf
ARCHIVE = kennel
PDF_DIR = report
%.o: src/%.c
$(CC) -c $< -o $@ $(CFLAGS)
2024-04-20 15:42:32 +02:00
release: CFLAGS += -O2
2024-04-18 22:37:23 +02:00
release: compilation
2024-04-17 16:00:32 +02:00
debug: CFLAGS += -Wall -Wextra -Wshadow -Wcast-align -Wstrict-prototypes
debug: CFLAGS += -fanalyzer -fsanitize=undefined -g -Og
debug: LDFLAGS += -fsanitize=undefined
debug: compilation
2024-04-18 22:37:23 +02:00
compilation: $(OBJETS)
$(CC) -o $(EXE)$(EXE_EXT) $(OBJETS) $(LDFLAGS)
all:
2024-04-18 22:37:23 +02:00
release
pdf-make:
cd report && \
$(MAKE)
pdf-clean:
2024-03-15 12:19:51 +01:00
@cd report && \
$(MAKE) clean
clean: pdf-clean
2024-03-26 20:50:32 +01:00
$(RM) $(OBJETS) "$(EXE)$(EXE_EXT)" "$(ARCHIVE).tar"
archive: pdf-make
$(MKDIR) "$(ARCHIVE)"
$(CP) "$(SRC_DIR)" "$(INC_DIR)" Makefile README \
"$(wildcard $(PDF_DIR)/*.pdf)" "$(ARCHIVE)"
$(TAR) "$(ARCHIVE).tar" "$(ARCHIVE)"
$(RM) "$(ARCHIVE)"