kicad/libs.linux

96 lines
2.9 KiB
Plaintext
Raw Blame History

#Configuration for build kicad
KICAD_BIN = /usr/local/kicad/linux
SRCSUFF = .cpp
OBJSUFF = .o
FINAL = 1
# You must comment or uncomment this line to disable/enable python support
#KICAD_PYTHON = 1
# You must comment this line for dynamic link (or build with "make -f makefile.gtk KICAD_STATIC_LINK=0")
# dynamic link is less difficult than static link choose it if you have problems (libs not found, or
# unresolved references), or if kicad is running only on YOUR system.
ifndef KICAD_PYTHON
KICAD_STATIC_LINK = 1
endif
ifdef KICAD_PYTHON
PYTHON_VERSION=2.3
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
# 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
ifeq ($(KICAD_STATIC_LINK), 1)
#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
LIBVERSION=`wx-config --release`
LIBREGEX=$(WXPATH)/libwxregexu-$(LIBVERSION).a
# use link static for wxWidgets
ifeq ($(KICAD_STATIC_LINK), 1)
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\
$(LIBREGEX)\
/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\
-L/usr/lib $(PYLIBS)
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\
-L/usr/lib $(PYLIBS)
else
#or use "standard command" for wxWidgets
WXSYSLIB= `wx-config --libs std`
WXSYSLIB_WITH_GL= `wx-config --libs std,gl`
endif
# attention <20> l'ordre des libairies
LIBS = -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)