|
|
## Configuration for kicad build & install#
# You must comment or uncomment this line to disable/enable python support#KICAD_PYTHON = 1
# Locations for install targets. All can be overriden on the make command.# Normally you'd only expect to override the PREFIX if you want to install to# a non standard install dir (or a temp location for packaging).# For packaging you can override and install anywhere, but to run from a# non-standard location edit common/gestfich.ccp so it knows where to# load help/data/etc. files from.# Current supported PREFIXes are /usr and /usr/local (standard install for distributions)# and /usr/local/kicad is used when STD_INSTALL = 0 or STD_INSTALL = 2# all kicad files will be in /usr/local/kicad# STD_INSTALL = 2 is used only to make static link (only useful when kicad run on an other # linux distribution than the distributions used to compil kicad.
STD_INSTALL = 1
#*******************************************#*******************************************
ifndef KICAD_PYTHONifeq ($(STD_INSTALL), 2)KICAD_STATIC_LINK = 1endifendif
ifndef KICAD_STATIC_LINKKICAD_STATIC_LINK = 0endif
ifeq ($(STD_INSTALL), 1)PREFIX = /usrKICAD_BIN = $(PREFIX)/binKICAD_PLUGINS = $(PREFIX)/lib/kicad/pluginsKICAD_DOCS=$(PREFIX)/share/doc/kicadKICAD_DATA=$(PREFIX)/share/kicadKICAD_MODULES=$(KICAD_DATA)/modulesKICAD_LIBRARY=$(KICAD_DATA)/libraryKICAD_INTERNAT=$(KICAD_DATA)/internatKICAD_TEMPLATE=$(KICAD_DATA)/template
else# when STD_INSTALL = 0 or STD_INSTALL = 2# STD_INSTALL = 2 is used by myself (JP Charras) to build a statically linked distribution intalled in /usr/local (with STD_INSTALL = 0)PREFIX = /usr/local/kicadKICAD_BIN = $(PREFIX)/linuxKICAD_PLUGINS = $(KICAD_BIN)/pluginsKICAD_DOCS=$(PREFIX)/helpKICAD_DATA=$(PREFIX)KICAD_MODULES=$(KICAD_DATA)/modulesKICAD_LIBRARY=$(KICAD_DATA)/libraryKICAD_INTERNAT=$(KICAD_DATA)/internatKICAD_TEMPLATE=$(KICAD_DATA)/templateendif
# http://www.gnu.org/software/autoconf/manual/make/Catalogue-of-Rules.html#Catalogue-of-RulesCXX = g++
SRCSUFF = .cppOBJSUFF = .oFINAL = 1
# turn on/OFF debugging for all executables, only tested without KICAD_PYTHONDEBUG = 1
# common CPPFLAGS to all components, further CPPFLAGS customization in # directory specific makefile.gtk files.ifeq ($(DEBUG), 1)WXXFLAGS := $(shell wx-config --debug --cxxflags) CPPFLAGS = -Wall -g3 -ggdb3 ${WXXFLAGS} -fno-strict-aliasing -DDEBUG -D_UNICODELDFLAGS = -g3 -ggdb3 #-velseWXXFLAGS := $(shell wx-config --cxxflags) CPPFLAGS = -Wall -O2 ${WXXFLAGS} -fno-strict-aliasing -D_UNICODELDFLAGS = -s #-vendif
# a command line define which affects pcbnew only, causing it to match current layer ifdef USE_MATCH_LAYERCPPFLAGS += -DUSE_MATCH_LAYER endif
ifeq ($(KICAD_STATIC_LINK), 1)LD = gccelseLD = g++endif
ifdef KICAD_PYTHONPYTHON_VERSION=2.5PYLIBS= -L/usr/libPYLIBS+= -L /usr/include/pythonPYLIBS+= -lpython$(PYTHON_VERSION)PYLIBS+= -lboost_python-mtEXTRACPPFLAGS+=-I /usr/include/python$(PYTHON_VERSION) -DKICAD_PYTHON -fno-strict-aliasingendif
# path and version definition for wxWidgets and mesa libsMESALIBSPATH = /usr/local/libWXPATH = `wx-config --prefix`/libPREFIX_WX_LIBS = lib`wx-config --basename`SUFFIX_WX_LIBSTD = `wx-config --utility=`SUFFIX_WX_LIBGL = _gl-$(LIBVERSION).a
# Use static link for libstdc++.a (sometimes also libsupc++.a)# locate libstdc++.a and copy it in kicad_dev/syslibsifeq ($(KICAD_STATIC_LINK), 1)#define path for a copy of libstdc++.a or/and libsupc++.a:LIBSTDC = ../syslibs/libstdc++.aelse# Or Use static link for libsupc++ or libstdc++ (more easy!!)LIBSTDC = #-lstdc++ is implied when using g++ to linkendif
LIBVERSION=`wx-config --release`LIBREGEX=$(WXPATH)/libwxregexu-$(LIBVERSION).a
# use link static for wxWidgetsifeq ($(KICAD_STATIC_LINK), 1)LIBS3D = $(WXPATH)/$(PREFIX_WX_LIBS)$(SUFFIX_WX_LIBGL)\ $(MESALIBSPATH)/libGL.a $(MESALIBSPATH)/libGLU.a
AUXLIB = -lXxf86vm#AUXLIB = /usr/X11R6/lib/libXinerama.a
WXSYSLIB= $(WXPATH)/$(PREFIX_WX_LIBS)-$(LIBVERSION).a \ $(WXPATH)/libwxpng-$(LIBVERSION).a\ $(WXPATH)/libwxjpeg-$(LIBVERSION).a\ $(WXPATH)/libwxzlib-$(LIBVERSION).a\ $(LIBREGEX)\ $(AUXLIB)\ -lgtk-x11-2.0 -lgdk-x11-2.0 \ -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lgthread-2.0\ -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl\ -lglib-2.0 -lpangoft2-1.0 -lSM\ -L/usr/lib $(PYLIBS)
WXSYSLIB_WITH_GL= $(WXSYSLIB) $(LIBS3D)
else
ifeq ($(DEBUG), 1)# debug wxWidgetsWXSYSLIB= `wx-config --debug --libs std`WXSYSLIB_WITH_GL= `wx-config --debug --libs std,gl`else# or use "standard command" for wxWidgetsWXSYSLIB= `wx-config --libs std`WXSYSLIB_WITH_GL= `wx-config --libs std,gl`endif
endif
# attention � l'ordre des libairiesLIBS = -L/usr/local/lib -L/usr/X11R6/lib\ $(EXTRALIBS) $(WXSYSLIB)\ $(LIBSTDC) $(PYLIBS)
LIBS_WITH_GL = -L/usr/local/lib -L/usr/X11R6/lib\ $(EXTRALIBS) $(WXSYSLIB_WITH_GL)\ $(LIBSTDC) $(PYLIBS)
|