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

ADD: .gitignore and Makefile

parent d0370dc2
Branches
No related tags found
No related merge requests found
.idea
build
*.o
doc/*.pdf
Makefile 0 → 100644
CC := gcc
CFLAGS := -std=c11 -Wall -Wextra -fsanitize=address -fsanitize=leak -pedantic -Ofast -g
LDFLAGS := ${CFLAGS} -lm -lSDL2
SRCDIR := src
OUTDIR := build
TARGET := ${OUTDIR}/main
SRC := $(wildcard ${SRCDIR}/*.c)
HDR := $(wildcard ${SRCDIR}/*.h)
OBJ := $(patsubst %.c,${OUTDIR}/%.o,${SRC})
all: ${TARGET} ${DOC}
${TARGET}: ${OBJ} utils ${OUTDIR}
${CC} ${LDFLAGS} -o $@ ${OBJ}
${OBJ}: ${OUTDIR}/%.o: %.c ${HDR} ${OUTDIR}
${CC} ${CFLAGS} -c -o $@ $<
${OUTDIR}:
mkdir -p ${OUTDIR}
.PHONY: all clean doc exec utils
doc:
make -C doc
utils:
make -C utils
clean:
rm -rf ${OUTDIR}
make -C doc clean
make -C utils clean
exec: ${TARGET}
./${TARGET}
#include <stdlib.h>
int main() {
return EXIT_SUCCESS;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment