aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: 56f81cc3e1e570c2ce7794dbd5f6e3998ce826e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
CC 		:= cc
CFLAGS 	:= -Wall -Wall -pedantic -std=c11
DLIBS 	:= -lm $(shell pkg-config --libs glfw3 opengl glew)
OBJDIR 	= objs
SRCDIR  = src
OBJS 	= $(addprefix objs/,main.o shader.o linear.o)
BIN 	= mverse

all: build run

$(OBJS): | $(OBJDIR)

$(OBJDIR):
	mkdir ${OBJDIR}

$(OBJDIR)/%.o: $(SRCDIR)/%.c
	${CC} -c $< -o $@ ${CFLAGS}

build: $(OBJS)
	${CC} $^ -o ${BIN} ${DLIBS}

run:
	./${BIN}

clean:
	@rm $(OBJS) -v
Feel free to download, copy and edit any repo