Initial commit
This commit is contained in:
35
Makefile
Normal file
35
Makefile
Normal file
@@ -0,0 +1,35 @@
|
||||
CC=g++
|
||||
CPPFLAGS= -Wall \
|
||||
-Wextra \
|
||||
-pipe \
|
||||
-Wmissing-declarations \
|
||||
-pedantic \
|
||||
-O2
|
||||
|
||||
LDFLAGS=-lncursesw
|
||||
|
||||
SOURCES=main.cpp \
|
||||
chess.cpp \
|
||||
bishop.cpp \
|
||||
rook.cpp \
|
||||
queen.cpp \
|
||||
king.cpp \
|
||||
knight.cpp \
|
||||
pawn.cpp
|
||||
|
||||
OBJECTS=$(SOURCES:.cpp=.o)
|
||||
EXECUTABLE=chess
|
||||
|
||||
all: $(SOURCES) $(EXECUTABLE)
|
||||
|
||||
$(EXECUTABLE): $(OBJECTS)
|
||||
@echo ' LD $@'
|
||||
@$(CC) $(LDFLAGS) $(OBJECTS) -o $@
|
||||
|
||||
.cpp.o:
|
||||
@echo ' CC $@'
|
||||
@$(CC) $(CPPFLAGS) -c $< -o $@
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJECTS)
|
||||
|
||||
Reference in New Issue
Block a user