[go: up one dir, main page]

Menu

[r8]: / Makefile  Maximize  Restore  History

Download this file

34 lines (25 with data), 587 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
# Makefile for unix-like systems, tested with GNU Make
TARGET = Colonization
SOURCES = $(wildcard *.cpp)
OBJECTS = $(subst .cpp$,.o,$(SOURCES))
HEADERS = $(wildcard *.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)
.cpp.o: $*.h
$(CPP) -c $(CPPFLAGS) -o $@ $<
clean:
-rm -f $(OBJECTS)
-rm -f $(TARGET)
run: $(TARGET)
./$(TARGET)