-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
36 lines (28 loc) · 828 Bytes
/
makefile
File metadata and controls
36 lines (28 loc) · 828 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
34
35
36
CC=gcc
CXX=g++
RM=rm -rf
OPTS=-c -Wall
INCDIRS=$(shell find . -type d | grep "include")
INC=$(foreach d, $(INCDIRS), -I$d)
CPPFLAGS=-g -O0 -I/usr/local/include -I/usr/include/SDL2 -D_REENTRANT -I. -I/usr/include $(INC) -c -Wall -std=c++11
LDFLAGS=-g
LDLIBS=-L/usr/local/lib -L/usr/lib -L/usr/local/lib -lGLEW -lGLU -lGL -L/usr/lib/x86_64-linux-gnu -lSDL2
SRCDIR=.
OBJDIR=obj
BINDIR=bin
DEPDIR=dep
MAKEDEPEND = touch $*.d && makedepend $(CPPFLAGS) -f $*.d $<
SRCS=$(shell find $(SRCDIR) -name "*.cpp")
OBJS=$(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(SRCS))
all: nexcpp
nexcpp: $(OBJS)
test -d $(BINDIR) || mkdir $(BINDIR)
$(CXX) $(LDFLAGS) -o bin/nexcpp $(OBJS) $(LDLIBS)
$(OBJDIR)/%.o: $(SRCDIR)/%.cpp
$(CXX) $(CPPFLAGS) -c $< -o $@
clean:
$(RM) $(OBJS)
dist-clean: clean
$(RM) *~ $(BINDIR) *.log
test:
$(OBJS)