aboutsummaryrefslogblamecommitdiffstats
path: root/Makefile.inc
blob: 661da8b89bb794e67e3aee38984fe84d73f8b6c2 (plain) (tree)
1
2
3
4
5
6
7
8
9
                        
                                        
 

                                                                      
 

                          
 






                              
                      












                                                                                                           
# -*- mode: makefile -*-
TOP:=$(dir $(lastword $(MAKEFILE_LIST)))

headers+=$(wildcard $(TOP)src/*/*.hpp) $(wildcard $(TOP)src/*/*/*.hpp)
sources+=$(wildcard $(TOP)src/*/*.cpp) $(wildcard $(TOP)src/*/*/*.cpp)

deps=$(sources:.cpp=.d)
objects=$(sources:.cpp=.o)

# APPS
PKG_CONFIG:=pkg-config
LOG4CPP_CONFIG:=log4cpp-config

# CFLAGS
PEDENTIC:=-Wall -Werror
DEBUG:=-g
INC_PATH:=-I$(TOP)src/
FTGL_CFLAGS:=$(shell $(PKG_CONFIG) ftgl --cflags)

# LDFLAGS
SQLITE_LDFLAGS:=-lsqlite3
LOG4CPP_LDFLAGS:=$(shell $(LOG4CPP_CONFIG) --libs)
BOOST_LDFLAGS:=-lboost_program_options-mt -lboost_filesystem-mt -lboost_thread-mt
SDL_LDFLAGS:=-lSDL -lSDL_image -lSDL_gfx
GL_LDFLAGS:=-lGL
FTGL_LDFLAGS:=$(shell $(PKG_CONFIG) ftgl --libs)


CXXFLAGS:=$(PEDENTIC) $(INC_PATH) $(DEBUG) $(FTGL_CFLAGS)
LDFLAGS:=$(SQLITE_LDFLAGS) $(LOG4CPP_LDFLAGS) $(BOOST_LDFLAGS) $(SDL_LDFLAGS) $(GL_LDFLAGS) $(FTGL_LDFLAGS)