#color scheme COLOR_NONE=\x1b[0m COLOR_COMPILE=\x1b[32;01m COLOR_BUILD=\x1b[35;01m COLOR_CLEAN=\x1b[31;01m #architecture ARCHITECTURE=$(shell uname -m) #application name APP_NAME=robolliurex #libraries LIBS=cairo lgi-1.0 lsf-1.0 gtk+-3.0 pango #objects OBJECTS=main.o robocore.o robopilot.o roboslot.o robowidgets.o rsrcmanager.o #cflags CCFLAGS=`pkg-config $(LIBS) --cflags` #link CCLINK=`pkg-config $(LIBS) --libs` #custom setup CCFLAGS+=-pthread -std=c++0x CCLINK+=-lpthread ifdef DISTRIBUTION CCFLAGS+=-DDISTRIBUTION endif ifdef DEBUG CCFLAGS+=-g else CCFLAGS+=-O2 endif #use MMX, SSE and SSE2 on 32-bit architectures ifeq ($(ARCHITECTURE),i686) CCFLAGS+=-march=pentium4 endif all: $(APP_NAME) pot: xgettext -d roboliurex -s --keyword=T -o robolliurex.pot main.cpp robopilot.cpp $(APP_NAME): $(OBJECTS) @echo -e '$(COLOR_BUILD)* Building [$@]$(COLOR_NONE)' g++ -o $(APP_NAME) $(OBJECTS) $(CCLINK) %.o : %.cpp @echo -e '$(COLOR_COMPILE)* Compiling [$<]$(COLOR_NONE)' g++ -c $< $(CCFLAGS) %.o : %.c @echo -e '$(COLOR_COMPILE)* Compiling [$<]$(COLOR_NONE)' g++ -c $< $(CCFLAGS) clean: @echo -e '$(COLOR_BUILD)* Cleaning$(COLOR_NONE)' rm -f $(APP_NAME) rm -f $(OBJECTS) .PHONY: all pot clean