1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
--- libs.FreeBSD.orig Sat Jan 27 00:07:38 2007
+++ libs.FreeBSD Sat Jan 27 00:08:36 2007
@@ -1,6 +1,6 @@
#Configuration for build kicad
-KICAD_BIN = /usr/local/kicad/FreeBSD
+KICAD_BIN = ${PREFIX}/kicad/FreeBSD
SRCSUFF = .cpp
@@ -11,26 +11,31 @@
# You must comment or uncomment this line for dynamic or static link
# 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.
-KICAD_STATIC_LINK = 1
+#KICAD_STATIC_LINK = 1
# 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=`
+MESALIBSPATH = ${LOCALBASE}/lib
+WXPATH = `${WX_CONFIG} --prefix`/lib
+ifdef KICAD_STATIC_LINK
+PREFIX_WX_LIBS = lib`${WX_CONFIG} --basename`
SUFFIX_WX_LIBGL = _gl-$(LIBVERSION).a
+else
+PREFIX_WX_LIBS = `${WX_CONFIG} --basename`
+SUFFIX_WX_LIBGL = _gl-$(LIBVERSION)
+endif
+#SUFFIX_WX_LIBSTD = `${WX_CONFIG} --utility=`
# Use static link for libstdc++.a (sometimes also libsupc++.a)
# locate libstdc++.a and copy it in kicad_dev/syslibs
ifdef KICAD_STATIC_LINK
#define path for a copy of libstdc++.a or/and libsupc++.a:
-LIBSTDC = ../syslibs/libstdc++.a
+LIBSTDC = /usr/lib/libstdc++.a
else
# Or Use static link for libsupc++ or libstdc++ (more easy!!)
LIBSTDC = -lstdc++
endif
-LIBVERSION=`wx-config --release`
+LIBVERSION=`${WX_CONFIG} --release`
# use link static for wxWidgets
ifdef KICAD_STATIC_LINK
@@ -38,11 +43,11 @@
$(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\
- /usr/X11R6/lib/libXinerama.a \
- /usr/X11R6/lib/libXxf86vm.a \
+ -lpng\
+ -ljpeg\
+ -lz\
+ ${X11BASE}/lib/libXinerama.a \
+ ${X11BASE}/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\
@@ -51,12 +56,12 @@
WXSYSLIB_WITH_GL= $(WXPATH)/$(PREFIX_WX_LIBS)-$(LIBVERSION).a \
- $(WXPATH)/libwxpng-$(LIBVERSION).a\
- $(WXPATH)/libwxjpeg-$(LIBVERSION).a\
- $(WXPATH)/libwxzlib-$(LIBVERSION).a\
+ -lpng\
+ -ljpeg\
+ -lz\
$(LIBS3D)\
- /usr/X11R6/lib/libXinerama.a \
- /usr/X11R6/lib/libXxf86vm.a \
+ ${X11BASE}/lib/libXinerama.a \
+ ${X11BASE}/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\
@@ -64,16 +69,16 @@
-L/usr/lib
else
#or use "standard command" for wxWidgets
-WXSYSLIB= `wx-config --libs std`
-WXSYSLIB_WITH_GL= `wx-config --libs std,gl`
+WXSYSLIB= `${WX_CONFIG} --libs`
+WXSYSLIB_WITH_GL= `${WX_CONFIG} --libs std,gl`
endif
-# attention à l'ordre des libairies
-LIBS = -L/usr/local/lib -L/usr/X11R6/lib\
+# attention à l'ordre des librairies
+LIBS = -L${LOCALBASE}/lib -L${X11BASE}/lib\
$(EXTRALIBS) $(WXSYSLIB)\
$(LIBSTDC)
-LIBS_WITH_GL = -L/usr/local/lib -L/usr/X11R6/lib\
+LIBS_WITH_GL = -L${LOCALBASE}/lib -L${X11BASE}/lib\
$(EXTRALIBS) $(WXSYSLIB_WITH_GL)\
$(LIBSTDC)
|