-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
27 lines (18 loc) · 684 Bytes
/
Copy pathmakefile
File metadata and controls
27 lines (18 loc) · 684 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
IDIR =include
CXX=g++
CXXFLAGS=-O3 -std=c++11 -I$(IDIR)
ODIR=obj
CDIR=src
LIBS=./lib/libncurses.so.5 ./lib/libtinfo.so.5
_DEPS = ColorsDef.h Game.h GameField.h GameFieldStrings.h GlobalDefines.h InputHandler.h LogicBox.hpp LogVal.h Map.h MessageWindow.h Sleep.h Tile.h
DEPS = $(patsubst %,$(IDIR)/%,$(_DEPS))
_OBJ = ColorDefiner.o Game.o GameField.o InputHandler.o LogicBox.o LogVal.o Map.o MessageWindow.o Tile.o main.o
OBJ = $(patsubst %,$(ODIR)/%,$(_OBJ))
$(ODIR)/%.o: $(CDIR)/%.cpp $(DEPS)
@mkdir -p $(ODIR)
$(CXX) -c -o $@ $< $(CXXFLAGS)
logic: $(OBJ)
$(CXX) -o $@ $^ $(CXXFLAGS) -Wl,-rpath,./lib $(LIBS)
.PHONY: clean
clean:
rm -f $(ODIR)/*.o *~ core $(INCDIR)/*~