DamnCute/Makefile_linux
2016-05-29 18:10:44 +02:00

55 lines
1.1 KiB
Plaintext

##### DamnCute Engine ####
### Makefile for Linux ###
SRC = src/Bullet.cpp \
src/Path.cpp \
src/Background.cpp \
src/Core/Core.cpp \
src/APlayer.cpp \
src/AGame.cpp \
VERSION = 1.0
NAME = libdamncute.1.a
DEST = ./build
CXXFLAGS = -Wall -Wextra -ansi -W -O2 -I./include -I./include/damncute -std=c++0x -g
OBJS = $(SRC:.cpp=.o)
RM = rm -rf
CXX = clang++
LINKER = $(CXX)
LDFLAGS = -static -shared -fPIC -L./libs/linux -Wl,-rpath ./libs/linux
GREEN = \033[01;32m
STOPCOL = \033[00m
all: project
project: $(OBJS)
@rm -rf $(DEST)
@mkdir -p $(DEST)/libs
ar rcs $(DEST)/libs/$(NAME) $(OBJS)
@cp -R include $(DEST)
@cp -R libs/linux/* $(DEST)/libs
@cp -R src $(DEST)
@rm -rf $(DEST)/src
@cp -R assets/linux/* $(DEST)
@cp -R assets/src $(DEST)
@cp -R assets/resources $(DEST)
@cp -R assets/linux/launcher.sh $(DEST) && chmod +x $(DEST)/launcher.sh
@echo -e "Sample project created into $(GREEN)$(DEST)$(STOPCOL)"
build-only: $(OBJS)
ar rcs $(NAME) $(OBJS)
@echo -e "Compiled as $(GREEN)$(NAME)$(STOPCOL)"
clean:
$(RM) $(OBJS) *.swp *~ *#
fclean: clean
$(RM) $(NAME)
$(RM) $(DEST)
.PHONY: all clean fclean re