kicad/libs.linux

136 lines
4.0 KiB
Plaintext
Raw Normal View History

#
# Configuration for kicad build & install if not using cmake
# and wxWidgets 2.8.8
#
# 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)
# /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 = 0
#*******************************************
#*******************************************
ifndef KICAD_PYTHON
ifeq ($(STD_INSTALL), 2)
KICAD_STATIC_LINK = 1
endif
endif
ifndef KICAD_STATIC_LINK
KICAD_STATIC_LINK = 0
endif
ifeq ($(STD_INSTALL), 1) # Used to build linux distribs
PREFIX = /usr # (can also be /usr/local)
KICAD_BIN = $(PREFIX)/bin # Install main binaries here
KICAD_PLUGINS = $(KICAD_BIN) # Install other binaries here
KICAD_DOCS=$(PREFIX)/share/doc/kicad # Install doc files here
KICAD_DATA=$(PREFIX)/share/kicad # Install libraries and others files here
2007-05-06 16:03:28 +00:00
else # Install ALL files in /usr/local/kicad
# when STD_INSTALL = 0 or STD_INSTALL = 2
# STD_INSTALL = 0 is used to build kicad intalled in /usr/local
# STD_INSTALL = 2 is used by myself (JP Charras) to build a statically linked distribution intalled in /usr/local
PREFIX = /usr/local/kicad
KICAD_BIN = $(PREFIX)/bin
KICAD_PLUGINS = $(KICAD_BIN)/plugins
KICAD_DOCS=$(PREFIX)/help
KICAD_DATA=$(PREFIX)/share
endif
KICAD_MODULES=$(KICAD_DATA)/modules
KICAD_LIBRARY=$(KICAD_DATA)/library
KICAD_INTERNAT=$(KICAD_DATA)/internat
KICAD_TEMPLATE=$(KICAD_DATA)/template
# define compil and link
2008-09-18 05:36:16 +00:00
CXX = gcc
LD = g++
2007-05-06 16:03:28 +00:00
SRCSUFF = .cpp
OBJSUFF = .o
FINAL = 1
# turn ON/OFF debugging for all executables, only tested without KICAD_PYTHON
DEBUG = 0
# 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_UNICODE
2007-08-04 04:41:36 +00:00
LDFLAGS = -g3 -ggdb3 #-v
else
WXXFLAGS := $(shell wx-config --cxxflags)
CPPFLAGS = -Wall -O2 ${WXXFLAGS} -fno-strict-aliasing -D_UNICODE
LDFLAGS = -s #-v
endif
# a command line define which affects pcbnew only, causing it to match current layer
ifdef USE_MATCH_LAYER
CPPFLAGS += -DUSE_MATCH_LAYER
endif
ifdef KICAD_PYTHON
PYTHON_VERSION=2.5
PYLIBS= -L/usr/lib
PYLIBS+= -L /usr/include/python
PYLIBS+= -lpython$(PYTHON_VERSION)
PYLIBS+= -lboost_python-mt
EXTRACPPFLAGS+=-I /usr/include/python$(PYTHON_VERSION) -DKICAD_PYTHON -fno-strict-aliasing
endif
2007-05-06 16:03:28 +00:00
# mesa (free opengl library) libs
2007-05-06 16:03:28 +00:00
MESALIBSPATH = /usr/local/lib
#for static link: add wx gl lib
LIBVERSION=`wx-config --release`
2007-05-06 16:03:28 +00:00
WXPATH = `wx-config --prefix`/lib
PREFIX_WX_LIBS = lib`wx-config --basename`
SUFFIX_WX_LIBGL = _gl-$(LIBVERSION).a
ifeq ($(DEBUG), 1)
# debug wxWidgets
WXSYSLIB= `wx-config --debug --libs std`
2007-05-06 16:03:28 +00:00
else
# or use "standard command" for wxWidgets
WXSYSLIB= `wx-config --libs std`
2007-05-06 16:03:28 +00:00
endif
# use link static
ifeq ($(KICAD_STATIC_LINK), 1)
LIBS3D = $(WXPATH)/$(PREFIX_WX_LIBS)$(SUFFIX_WX_LIBGL) $(MESALIBSPATH)/libGL.a $(MESALIBSPATH)/libGLU.a
WXSYSLIB_WITH_GL= $(WXSYSLIB) $(LIBS3D)
2007-05-06 16:03:28 +00:00
else
ifeq ($(DEBUG), 1)
WXSYSLIB_WITH_GL= `wx-config --debug --libs std,gl`
else
2007-05-06 16:03:28 +00:00
WXSYSLIB_WITH_GL= `wx-config --libs std,gl`
endif
endif
2007-05-06 16:03:28 +00:00
# attention a l'ordre des libairies
2007-05-06 16:03:28 +00:00
LIBS = -L/usr/local/lib -L/usr/X11R6/lib\
$(EXTRALIBS) $(WXSYSLIB) $(PYLIBS)
2007-05-06 16:03:28 +00:00
LIBS_WITH_GL = -L/usr/local/lib -L/usr/X11R6/lib\
$(EXTRALIBS) $(WXSYSLIB_WITH_GL) $(PYLIBS)