2007-06-16 09:07:23 +00:00
|
|
|
|
#
|
|
|
|
|
# Configuration for kicad build & install
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
# 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, /usr/local & /usr/local/kicad
|
|
|
|
|
PREFIX = /usr
|
|
|
|
|
KICAD_BIN = $(PREFIX)/bin
|
|
|
|
|
KICAD_PLUGINS = $(PREFIX)/lib/kicad/plugins
|
|
|
|
|
KICAD_DOCS=$(PREFIX)/share/doc/kicad
|
|
|
|
|
KICAD_DATA=$(PREFIX)/share/kicad
|
|
|
|
|
KICAD_MODULES=$(KICAD_DATA)/modules
|
|
|
|
|
KICAD_LIBRARY=$(KICAD_DATA)/library
|
|
|
|
|
KICAD_INTERNAT=$(KICAD_DATA)/internat
|
|
|
|
|
KICAD_TEMPLATE=$(KICAD_DATA)/template
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
2007-06-14 16:28:05 +00:00
|
|
|
|
# http://www.gnu.org/software/autoconf/manual/make/Catalogue-of-Rules.html#Catalogue-of-Rules
|
|
|
|
|
CXX = g++
|
|
|
|
|
LD = g++
|
|
|
|
|
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
|
|
SRCSUFF = .cpp
|
|
|
|
|
OBJSUFF = .o
|
|
|
|
|
FINAL = 1
|
|
|
|
|
|
2007-06-14 16:28:05 +00:00
|
|
|
|
|
|
|
|
|
# turn on debugging for all executables, only tested without KICAD_PYTHON
|
|
|
|
|
DEBUG = 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# common CPPFLAGS to all components, further CPPFLAGS customization in
|
|
|
|
|
# directory specific makefile.gtk files.
|
2007-06-15 07:16:40 +00:00
|
|
|
|
ifeq ($(DEBUG), 1)
|
2007-06-14 16:28:05 +00:00
|
|
|
|
CPPFLAGS = -Wall -g `wx-config --debug --cxxflags` -fno-strict-aliasing
|
|
|
|
|
LDFLAGS = -g #-v
|
|
|
|
|
else
|
|
|
|
|
CPPFLAGS = -Wall -O2 `wx-config --cxxflags` -fno-strict-aliasing
|
|
|
|
|
LDFLAGS = -s #-v
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
2007-05-28 18:09:49 +00:00
|
|
|
|
# You must comment or uncomment this line to disable/enable python support
|
|
|
|
|
#KICAD_PYTHON = 1
|
|
|
|
|
|
2007-06-13 13:26:20 +00:00
|
|
|
|
# You must uncomment these lines for static link (or build with "make -f makefile.gtk KICAD_STATIC_LINK=1")
|
|
|
|
|
# dynamic link is less difficult than static link and is what you would normally want
|
|
|
|
|
# to use if kicad is running only on your system or one with same level of libraries.
|
|
|
|
|
#ifndef KICAD_PYTHON
|
|
|
|
|
#KICAD_STATIC_LINK = 1
|
|
|
|
|
#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)
|
|
|
|
|
PYLIBS+= -lboost_python
|
|
|
|
|
EXTRACPPFLAGS+=-I /usr/include/python$(PYTHON_VERSION) -DKICAD_PYTHON -fno-strict-aliasing
|
|
|
|
|
endif
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
|
|
# path and version definition for wxWidgets and mesa libs
|
|
|
|
|
MESALIBSPATH = /usr/local/lib
|
|
|
|
|
WXPATH = `wx-config --prefix`/lib
|
|
|
|
|
PREFIX_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/syslibs
|
2007-06-11 19:33:59 +00:00
|
|
|
|
ifeq ($(KICAD_STATIC_LINK), 1)
|
2007-05-06 16:03:28 +00:00
|
|
|
|
#define path for a copy of libstdc++.a or/and libsupc++.a:
|
|
|
|
|
LIBSTDC = ../syslibs/libstdc++.a
|
|
|
|
|
else
|
|
|
|
|
# Or Use static link for libsupc++ or libstdc++ (more easy!!)
|
|
|
|
|
LIBSTDC = -lstdc++
|
|
|
|
|
endif
|
|
|
|
|
|
2007-05-28 18:09:49 +00:00
|
|
|
|
|
2007-05-06 16:03:28 +00:00
|
|
|
|
LIBVERSION=`wx-config --release`
|
2007-05-28 18:09:49 +00:00
|
|
|
|
LIBREGEX=$(WXPATH)/libwxregexu-$(LIBVERSION).a
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
|
|
# use link static for wxWidgets
|
2007-06-11 19:33:59 +00:00
|
|
|
|
ifeq ($(KICAD_STATIC_LINK), 1)
|
2007-05-06 16:03:28 +00:00
|
|
|
|
LIBS3D = $(WXPATH)/$(PREFIX_WX_LIBS)$(SUFFIX_WX_LIBGL)\
|
|
|
|
|
$(MESALIBSPATH)/libGL.a $(MESALIBSPATH)/libGLU.a
|
|
|
|
|
|
|
|
|
|
WXSYSLIB= $(WXPATH)/$(PREFIX_WX_LIBS)-$(LIBVERSION).a \
|
|
|
|
|
$(WXPATH)/libwxpng-$(LIBVERSION).a\
|
|
|
|
|
$(WXPATH)/libwxjpeg-$(LIBVERSION).a\
|
|
|
|
|
$(WXPATH)/libwxzlib-$(LIBVERSION).a\
|
2007-05-28 18:09:49 +00:00
|
|
|
|
$(LIBREGEX)\
|
2007-05-06 16:03:28 +00:00
|
|
|
|
/usr/X11R6/lib/libXinerama.a \
|
|
|
|
|
-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\
|
2007-05-28 18:09:49 +00:00
|
|
|
|
-L/usr/lib $(PYLIBS)
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WXSYSLIB_WITH_GL= $(WXPATH)/$(PREFIX_WX_LIBS)-$(LIBVERSION).a \
|
|
|
|
|
$(WXPATH)/libwxpng-$(LIBVERSION).a\
|
|
|
|
|
$(WXPATH)/libwxjpeg-$(LIBVERSION).a\
|
|
|
|
|
$(WXPATH)/libwxzlib-$(LIBVERSION).a\
|
|
|
|
|
$(LIBS3D)\
|
|
|
|
|
/usr/X11R6/lib/libXinerama.a \
|
|
|
|
|
/usr/X11R6/lib/libXxf86vm.a \
|
|
|
|
|
-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\
|
2007-05-28 18:09:49 +00:00
|
|
|
|
-L/usr/lib $(PYLIBS)
|
2007-05-06 16:03:28 +00:00
|
|
|
|
else
|
2007-06-14 16:28:05 +00:00
|
|
|
|
|
2007-06-15 07:16:40 +00:00
|
|
|
|
ifeq ($(DEBUG), 1)
|
2007-06-14 16:28:05 +00:00
|
|
|
|
# debug wxWidgets
|
|
|
|
|
WXSYSLIB= `wx-config --debug --libs std`
|
|
|
|
|
WXSYSLIB_WITH_GL= `wx-config --debug --libs std,gl`
|
|
|
|
|
else
|
|
|
|
|
# or use "standard command" for wxWidgets
|
2007-05-06 16:03:28 +00:00
|
|
|
|
WXSYSLIB= `wx-config --libs std`
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
# attention <20> l'ordre des libairies
|
|
|
|
|
LIBS = -L/usr/local/lib -L/usr/X11R6/lib\
|
|
|
|
|
$(EXTRALIBS) $(WXSYSLIB)\
|
2007-05-28 18:09:49 +00:00
|
|
|
|
$(LIBSTDC) $(PYLIBS)
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
|
|
LIBS_WITH_GL = -L/usr/local/lib -L/usr/X11R6/lib\
|
|
|
|
|
$(EXTRALIBS) $(WXSYSLIB_WITH_GL)\
|
2007-05-28 18:09:49 +00:00
|
|
|
|
$(LIBSTDC) $(PYLIBS)
|