aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: a676b86c3526c174694df1ee6c82eefff526b62a (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
27
CC 		:= cc
CFLAGS 	:= -Wall -pedantic -pedantic-errors -std=c99
DLIBS 	:= -lm $(shell pkg-config --libs glfw3 opengl glew)
INCLUDE := $(addprefix -I,./include)
OBJDIR 	= objs
SRCDIR  = src
OBJS 	= $(addprefix objs/,main.o shader.o linear.o obj.o)
BIN 	= mverse

all: build

$(OBJS): | $(OBJDIR)

$(OBJDIR):
	mkdir ${OBJDIR}

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

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

run:
	./${BIN}

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