-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (23 loc) · 753 Bytes
/
Makefile
File metadata and controls
34 lines (23 loc) · 753 Bytes
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
28
29
30
31
32
33
CXX=g++
CXXFLAGS=-std=gnu++11 -Wall -Wextra -Wno-ignored-qualifiers -Wno-unused-parameter
LFLAGS=-lglut -lGLEW -lGL -lpng -lz
SRC=$(wildcard eel/*/*.cpp) eel/main.cpp
OBJECTS=$(patsubst eel/%,Obj/%,$(SRC:.cpp=.o))
DEPS=$(OBJECTS:.o=.d)
generate_deps = $(SHELL) -ec '$(CXX) -MM $(CXXFLAGS) $< | sed -n "H;$$ {g;s@.*:\(.*\)@$< := \$$\(wildcard\1\)\n$*.o $@: $$\($<\)@;p}" > $@'
run: Bin/eel
@ cd ./eel; ../Bin/eel; cd ..
all: Bin/eel
Bin/eel: $(OBJECTS) $(DEPS)
$(CXX) $(LFLAGS) $(OBJECTS) -o Bin/eel
Obj/%.d: eel/%.cpp
mkdir -p $(@D)
@echo -n $(@D) > $@
@echo -n "/" >> $@
$(CXX) -MM $(CXXFLAGS) $< >> $@
Obj/%.o: eel/%.cpp Obj/%.d
$(CXX) $(CXXFLAGS) -c $< -o $@
-include $(DEPS)
clean:
rm $(OBJECTS) $(DEPS) Bin/eel
.PHONY: all clean