Skip to content
Snippets Groups Projects
Commit 424ef43d authored by Boris Stefanovic's avatar Boris Stefanovic
Browse files

init

parents
No related branches found
No related tags found
No related merge requests found
.idea
*.o
build
*.pdf
Makefile 0 → 100644
SRC_DIR := src
BUILD_ROOT := build
CC := gcc
SRC := $(wildcard ${SRC_DIR}/*.c)
HDR := $(wildcard ${SRC_DIR}/*.h)
BUILD_DIR := ${BUILD_ROOT}/prod
TARGET := ${BUILD_DIR}/main
CFLAGS := -std=c11 -Wall -Wextra -pedantic
LDEXTRA :=
LDFLAGS := ${CFLAGS} ${LDEXTRA}
OBJ := $(patsubst ${SRC_DIR}/%.c,${BUILD_DIR}/%.o,${SRC})
DEBUG_BUILD_DIR := ${BUILD_ROOT}/debug
DEBUG_TARGET := ${DEBUG_BUILD_DIR}/debug
DEBUG_CFLAGS := ${CFLAGS} -fsanitize=address -fsanitize=leak -g -DDEBUG
DEBUG_LDEXTRA :=
DEBUG_LDFLAGS := ${DEBUG_CFLAGS} ${DEBUG_LDEXTRA}
DEBUG_OBJ := $(patsubst ${SRC_DIR}/%.c,${DEBUG_BUILD_DIR}/%.o,${SRC})
# TARGETS
all: ${TARGET} ${TARGET_DEBUG}
${TARGET}: ${OBJ}
${CC} ${LDFLAGS} -o $@ $^
${OBJ}: ${BUILD_DIR}/%.o: %.c ${HDR} ${BUILD_DIR}
${CC} ${CFLAGS} -c -o $@ $<
${DEBUG_TARGET}: ${DEBUG_OBJ}
${CC} ${DEBUG_LDFLAGS} -o $@ $^
${DEBUG_OBJ}: ${DEBUG_BUILD_DIR}/%.o: %.c ${HDR} ${DEBUG_BUILD_DIR}
${CC} ${DEBUG_CFLAGS} -c -o $@ $<
# DIRECTORIES
${BUILD_DIR} ${DEBUG_BUILD_DIR}: %:
mkdir -p $@
# PHONY
.PHONY: clean debug exec
clean:
rm -rf ${BUILD_ROOT}
debug: ${DEBUG_TARGET}
./$<
exec: ${TARGET}
./$<
SRC = $(wildcard *.md)
PDF = $(patsubst %.md,%.pdf,${SRC})
all: ${PDF}
read: ${PDF}
firefox $^
%.pdf: %.md Makefile
pandoc --pdf-engine=xelatex -o $@ $<
clean:
rm -rf ${PDF}
.PHONY: clean read
---
title: K-Means - Une Implémentation
author: Boris Stefanovic
date: 2022-05-24
geometry: "margin=40mm"
mainfont: DejaVu Sans
header-includes:
- \usepackage{float}
- \let\origfigure\figure
- \let\endorigfigure\endfigure
- \renewenvironment{figure}[1][2] {\expandafter\origfigure\expandafter[H]} {\endorigfigure}
---
\newpage
# Décisions
# Algorithmique
# Implémentation
#include <stdlib.h>
int main(int argc, char **argv) {
return EXIT_SUCCESS;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment