--- libs.FreeBSD.orig 2008-09-21 21:25:03.000000000 +0200 +++ libs.FreeBSD 2008-09-21 23:12:06.000000000 +0200 @@ -18,7 +18,7 @@ # 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 +STD_INSTALL = 1 #******************************************* #******************************************* @@ -34,17 +34,16 @@ 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 +# Install libraries and others files here +KICAD_DATA = $(PREFIX)/share/kicad 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 @@ -57,7 +56,7 @@ KICAD_TEMPLATE=$(KICAD_DATA)/template # define compil and link -LD = g++ +LD = $(CXX) SRCSUFF = .cpp OBJSUFF = .o @@ -71,12 +70,12 @@ # 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 -LDFLAGS = -g3 -ggdb3 #-v +WXXFLAGS := `${WX_CONFIG} --debug --cxxflags` +CPPFLAGS = -Wall -g ${WXXFLAGS} -fno-strict-aliasing -DDEBUG -D_UNICODE +LDFLAGS = -g #-v else -WXXFLAGS := $(shell wx-config --cxxflags) -CPPFLAGS = -Wall -O2 ${WXXFLAGS} -fno-strict-aliasing -D_UNICODE +WXXFLAGS := `${WX_CONFIG} --cxxflags` +CPPFLAGS+= -Wall ${WXXFLAGS} -fno-strict-aliasing -D_UNICODE LDFLAGS = -s #-v endif @@ -88,28 +87,28 @@ ifdef KICAD_PYTHON PYTHON_VERSION=2.5 -PYLIBS= -L/usr/lib -PYLIBS+= -L /usr/include/python +PYLIBS= -L${LOCALBASE}/lib +PYLIBS+= -L${LOCALBASE}/lib/python$(PYTHON_VERSION) PYLIBS+= -lpython$(PYTHON_VERSION) PYLIBS+= -lboost_python-mt -EXTRACPPFLAGS+=-I /usr/include/python$(PYTHON_VERSION) -DKICAD_PYTHON -fno-strict-aliasing +EXTRACPPFLAGS+=-I ${LOCALBASE}/python$(PYTHON_VERSION) -DKICAD_PYTHON -fno-strict-aliasing endif # mesa (free opengl library) libs -MESALIBSPATH = /usr/local/lib +MESALIBSPATH = ${LOCALBASE}/lib #for static link: add wx gl lib -LIBVERSION=`wx-config --release` -WXPATH = `wx-config --prefix`/lib -PREFIX_WX_LIBS = lib`wx-config --basename` +LIBVERSION=`${WX_CONFIG} --release` +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` +WXSYSLIB= `${WX_CONFIG} --debug --libs std` else # or use "standard command" for wxWidgets -WXSYSLIB= `wx-config --libs std` +WXSYSLIB= `${WX_CONFIG} --libs std` endif # use link static @@ -119,16 +118,16 @@ else ifeq ($(DEBUG), 1) -WXSYSLIB_WITH_GL= `wx-config --debug --libs std,gl` +WXSYSLIB_WITH_GL= `${WX_CONFIG} --debug --libs std,gl` else -WXSYSLIB_WITH_GL= `wx-config --libs std,gl` +WXSYSLIB_WITH_GL= `${WX_CONFIG} --libs std,gl` endif endif # attention a l'ordre des libairies -LIBS = -L/usr/local/lib -L/usr/X11R6/lib\ +LIBS = -L${LOCALBASE}/lib \ $(EXTRALIBS) $(WXSYSLIB) $(PYLIBS) -LIBS_WITH_GL = -L/usr/local/lib -L/usr/X11R6/lib\ +LIBS_WITH_GL = -L${LOCALBASE}/lib \ $(EXTRALIBS) $(WXSYSLIB_WITH_GL) $(PYLIBS)