2007-06-16 09:07:23 +00:00
|
|
|
#
|
2008-09-03 16:19:06 +00:00
|
|
|
# Configuration for kicad build & install if not using cmake
|
|
|
|
# and wxWidgets 2.8.8
|
2007-06-16 09:07:23 +00:00
|
|
|
#
|
|
|
|
|
2007-11-09 14:42:10 +00:00
|
|
|
# You must comment or uncomment this line to disable/enable python support
|
|
|
|
#KICAD_PYTHON = 1
|
|
|
|
|
2007-06-16 09:07:23 +00:00
|
|
|
# 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.
|
2007-11-09 14:42:10 +00:00
|
|
|
# Current supported PREFIXes are /usr and /usr/local (standard install for distributions)
|
2008-09-03 16:19:06 +00:00
|
|
|
# /usr/local/kicad is used when STD_INSTALL = 0, or STD_INSTALL = 2
|
2007-11-09 14:42:10 +00:00
|
|
|
# all kicad files will be in /usr/local/kicad
|
2008-09-03 16:19:06 +00:00
|
|
|
# STD_INSTALL = 2 is used only to make static link (only useful when kicad run on an other
|
2007-11-09 14:42:10 +00:00
|
|
|
# linux distribution than the distributions used to compil kicad.
|
2007-07-02 12:48:10 +00:00
|
|
|
|
2008-09-03 16:19:06 +00:00
|
|
|
STD_INSTALL = 0
|
2007-07-02 12:48:10 +00:00
|
|
|
|
2007-11-09 14:42:10 +00:00
|
|
|
#*******************************************
|
|
|
|
#*******************************************
|
|
|
|
|
|
|
|
ifndef KICAD_PYTHON
|
|
|
|
ifeq ($(STD_INSTALL), 2)
|
|
|
|
KICAD_STATIC_LINK = 1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef KICAD_STATIC_LINK
|
|
|
|
KICAD_STATIC_LINK = 0
|
|
|
|
endif
|
|
|
|
|
2008-09-03 16:19:06 +00:00
|
|
|
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
|
|
|
|
2008-09-03 16:19:06 +00:00
|
|
|
else # Install ALL files in /usr/local/kicad
|
2007-11-09 14:42:10 +00:00
|
|
|
# when STD_INSTALL = 0 or STD_INSTALL = 2
|
2008-09-03 16:19:06 +00:00
|
|
|
# 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
|
2007-09-22 14:31:20 +00:00
|
|
|
PREFIX = /usr/local/kicad
|
2008-09-03 16:19:06 +00:00
|
|
|
KICAD_BIN = $(PREFIX)/bin
|
2007-09-22 14:31:20 +00:00
|
|
|
KICAD_PLUGINS = $(KICAD_BIN)/plugins
|
2007-07-02 12:48:10 +00:00
|
|
|
KICAD_DOCS=$(PREFIX)/help
|
2008-09-03 16:19:06 +00:00
|
|
|
KICAD_DATA=$(PREFIX)/share
|
|
|
|
endif
|
|
|
|
|
2007-07-02 12:48:10 +00:00
|
|
|
KICAD_MODULES=$(KICAD_DATA)/modules
|
|
|
|
KICAD_LIBRARY=$(KICAD_DATA)/library
|
|
|
|
KICAD_INTERNAT=$(KICAD_DATA)/internat
|
|
|
|
KICAD_TEMPLATE=$(KICAD_DATA)/template
|
2007-06-14 16:28:05 +00:00
|
|
|
|
2008-09-03 16:19:06 +00:00
|
|
|
# define compil and link
|
2008-09-18 05:36:16 +00:00
|
|
|
CXX = gcc
|
2008-09-03 16:19:06 +00:00
|
|
|
LD = g++
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
SRCSUFF = .cpp
|
|
|
|
OBJSUFF = .o
|
|
|
|
FINAL = 1
|
|
|
|
|
2007-06-14 16:28:05 +00:00
|
|
|
|
2008-09-03 16:19:06 +00:00
|
|
|
# turn ON/OFF debugging for all executables, only tested without KICAD_PYTHON
|
|
|
|
DEBUG = 0
|
2007-06-14 16:28:05 +00:00
|
|
|
|
|
|
|
|
2008-09-03 16:19:06 +00:00
|
|
|
# common CPPFLAGS to all components, further CPPFLAGS customization in
|
2007-06-14 16:28:05 +00:00
|
|
|
# directory specific makefile.gtk files.
|
2007-06-15 07:16:40 +00:00
|
|
|
ifeq ($(DEBUG), 1)
|
2008-09-03 16:19:06 +00:00
|
|
|
WXXFLAGS := $(shell wx-config --debug --cxxflags)
|
2008-02-12 21:12:46 +00:00
|
|
|
CPPFLAGS = -Wall -g3 -ggdb3 ${WXXFLAGS} -fno-strict-aliasing -DDEBUG -D_UNICODE
|
2007-08-04 04:41:36 +00:00
|
|
|
LDFLAGS = -g3 -ggdb3 #-v
|
2007-06-14 16:28:05 +00:00
|
|
|
else
|
2008-09-03 16:19:06 +00:00
|
|
|
WXXFLAGS := $(shell wx-config --cxxflags)
|
2008-02-12 21:12:46 +00:00
|
|
|
CPPFLAGS = -Wall -O2 ${WXXFLAGS} -fno-strict-aliasing -D_UNICODE
|
2007-06-14 16:28:05 +00:00
|
|
|
LDFLAGS = -s #-v
|
|
|
|
endif
|
2007-08-02 02:04:45 +00:00
|
|
|
|
|
|
|
|
2008-09-03 16:19:06 +00:00
|
|
|
# a command line define which affects pcbnew only, causing it to match current layer
|
2007-08-02 02:04:45 +00:00
|
|
|
ifdef USE_MATCH_LAYER
|
2008-09-03 16:19:06 +00:00
|
|
|
CPPFLAGS += -DUSE_MATCH_LAYER
|
2007-07-09 09:29:53 +00:00
|
|
|
endif
|
2007-05-28 18:09:49 +00:00
|
|
|
|
|
|
|
ifdef KICAD_PYTHON
|
2007-06-14 16:28:05 +00:00
|
|
|
PYTHON_VERSION=2.5
|
2007-05-28 18:09:49 +00:00
|
|
|
PYLIBS= -L/usr/lib
|
|
|
|
PYLIBS+= -L /usr/include/python
|
|
|
|
PYLIBS+= -lpython$(PYTHON_VERSION)
|
2007-09-08 18:12:51 +00:00
|
|
|
PYLIBS+= -lboost_python-mt
|
2007-05-28 18:09:49 +00:00
|
|
|
EXTRACPPFLAGS+=-I /usr/include/python$(PYTHON_VERSION) -DKICAD_PYTHON -fno-strict-aliasing
|
|
|
|
endif
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2008-09-03 16:19:06 +00:00
|
|
|
# mesa (free opengl library) libs
|
2007-05-06 16:03:28 +00:00
|
|
|
MESALIBSPATH = /usr/local/lib
|
2008-09-03 16:19:06 +00:00
|
|
|
|
|
|
|
#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
|
|
|
|
|
2008-09-03 16:19:06 +00:00
|
|
|
ifeq ($(DEBUG), 1)
|
|
|
|
# debug wxWidgets
|
|
|
|
WXSYSLIB= `wx-config --debug --libs std`
|
2007-05-06 16:03:28 +00:00
|
|
|
else
|
2008-09-03 16:19:06 +00:00
|
|
|
# or use "standard command" for wxWidgets
|
|
|
|
WXSYSLIB= `wx-config --libs std`
|
2007-05-06 16:03:28 +00:00
|
|
|
endif
|
|
|
|
|
2008-09-03 16:19:06 +00:00
|
|
|
# use link static
|
2007-06-11 19:33:59 +00:00
|
|
|
ifeq ($(KICAD_STATIC_LINK), 1)
|
2008-09-03 16:19:06 +00:00
|
|
|
LIBS3D = $(WXPATH)/$(PREFIX_WX_LIBS)$(SUFFIX_WX_LIBGL) $(MESALIBSPATH)/libGL.a $(MESALIBSPATH)/libGLU.a
|
2007-09-22 14:31:20 +00:00
|
|
|
WXSYSLIB_WITH_GL= $(WXSYSLIB) $(LIBS3D)
|
|
|
|
|
2007-05-06 16:03:28 +00:00
|
|
|
else
|
2007-06-15 07:16:40 +00:00
|
|
|
ifeq ($(DEBUG), 1)
|
2007-06-14 16:28:05 +00:00
|
|
|
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
|
2007-06-14 16:28:05 +00:00
|
|
|
endif
|
|
|
|
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2008-09-03 16:19:06 +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\
|
2008-09-03 16:19:06 +00:00
|
|
|
$(EXTRALIBS) $(WXSYSLIB) $(PYLIBS)
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
LIBS_WITH_GL = -L/usr/local/lib -L/usr/X11R6/lib\
|
2008-09-03 16:19:06 +00:00
|
|
|
$(EXTRALIBS) $(WXSYSLIB_WITH_GL) $(PYLIBS)
|