[go: up one dir, main page]

Menu

[r11]: / Makefile  Maximize  Restore  History

Download this file

38 lines (29 with data), 768 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
# Makefile for unix-like systems, tested with GNU Make
RUNDIR = Colonization
RUNFILE = Colonization.run
TARGET = $(RUNDIR)/$(RUNFILE)
OBJDIR = obj
SRCDIR = .
SOURCES = $(wildcard $(SRCDIR)/*.cpp)
OBJECTS = $(patsubst $(SRCDIR)/%.cpp,$(OBJDIR)/%.o,$(SOURCES))
HEADERS = $(wildcard $(SRCDIR)/*.h)
CPP = g++
LINK = g++
STRIP = strip
INCLUDES = -I/usr/include/irrlicht
LLIBS = -l Irrlicht
CPPFLAGS = -g $(INCLUDES)
LFLAGS = $(INCLUDES) $(LLIBS)
.PHONY: build clean run all
.DEFAULT: build
build: $(TARGET)
$(TARGET): $(OBJECTS)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS)
# $(STRIP) $(TARGET)
$(OBJECTS): $(OBJDIR)/%.o: $(SRCDIR)/%.cpp
$(CPP) -c $(CPPFLAGS) -o $@ $<
clean:
-rm -f $(OBJECTS)
-rm -f $(TARGET)
run: $(TARGET)
cd $(RUNDIR) && ./$(RUNFILE) && cd -