Commit dc7235c7 authored by dickelbeck's avatar dickelbeck

Gathered up common compiler and linker flags for the makefile.gtk file set.

Much easier now to compile with debugging symbols enabled.
parent b5ef0962
## Makefile for 3d-viewer.a ( wxGTK - LINUX ) ## Makefile for 3d-viewer.a ( wxGTK - LINUX )
CC = gcc
# Compiler flags.
CPPFLAGS = -Wall -O2 -DPCBNEW -I../pcbnew -I ../include -I../common\
`wx-config --cxxflags` -fno-strict-aliasing
include ../libs.linux include ../libs.linux
# Compiler flags.
CPPFLAGS += -DPCBNEW -I../pcbnew -I ../include -I../common
TARGET = 3d-viewer TARGET = 3d-viewer
FINAL = 1 FINAL = 1
......
## Makefile for common.a ## Makefile for common.a
CC = gcc CC = gcc
include ../libs.linux
# Compiler flags. # Compiler flags.
CPPFLAGS = -Wall -O2 -I./ -I../include `wx-config --cflags` CPPFLAGS += -I./ -I../include
EDACPPFLAGS = $(CPPFLAGS) EDACPPFLAGS = $(CPPFLAGS)
all: common.a all: common.a
include ../libs.linux
include makefile.include include makefile.include
CPPFLAGS += $(EXTRACPPFLAGS) -fno-strict-aliasing CPPFLAGS += $(EXTRACPPFLAGS) -fno-strict-aliasing
......
# File: makefile # File: makefile
# Compiler flags.
CC = gcc
LD = gcc
FINAL = 1 FINAL = 1
# Compiler flags.
CPPFLAGS = -Wall -O2 `wx-config --cxxflags` include ../libs.linux
LDFLAGS = -s # Compiler flags.
CPPFLAGS +=
EDACPPFLAGS = $(CPPFLAGS) EDACPPFLAGS = $(CPPFLAGS)
include ../libs.linux
TARGET = cvpcb TARGET = cvpcb
all: $(TARGET) all: $(TARGET)
......
## Makefile for eeschema ## Makefile for eeschema
CC = gcc
#LD = c++ pour utiliser libstdc++ dynamique
LD = gcc
FINAL = 1
include ../libs.linux
LDFLAGS = -s
include ../libs.linux # Additional compiler flags
CPPFLAGS +=
TARGET = eeschema TARGET = eeschema
CPPFLAGS = -Wall -O2 `wx-config --cxxflags`
all: $(TARGET) all: $(TARGET)
......
## Makefile for GERBVIEW et wxGTK ## Makefile for GERBVIEW et wxGTK
CC = gcc
LD = gcc
# Compiler flags.
CPPFLAGS = -Wall -O2 `wx-config --cxxflags`
LDFLAGS = -s
include ../libs.linux include ../libs.linux
# Additional compiler flags.
CPPFLAGS +=
TARGET = gerbview TARGET = gerbview
...@@ -34,5 +31,4 @@ clean: ...@@ -34,5 +31,4 @@ clean:
rm -f *.map rm -f *.map
rm -f $(TARGET) rm -f $(TARGET)
\ No newline at end of file
# File: makefile for kicad, wxGTK # File: makefile for kicad, wxGTK
# Compiler flags.
CC = gcc
LD = gcc
FINAL = 1 include ../libs.linux
# Compiler flags. # Additional compiler flags
CPPFLAGS = -Wall -O2 `wx-config --cxxflags` CPPFLAGS +=
LDFLAGS = -s
include ../libs.linux FINAL = 1
TARGET = kicad TARGET = kicad
......
...@@ -3,11 +3,31 @@ ...@@ -3,11 +3,31 @@
KICAD_BIN = /usr/local/kicad KICAD_BIN = /usr/local/kicad
KICAD_PLUGINS = $(KICAD_BIN)/plugins KICAD_PLUGINS = $(KICAD_BIN)/plugins
# http://www.gnu.org/software/autoconf/manual/make/Catalogue-of-Rules.html#Catalogue-of-Rules
CXX = g++
LD = g++
SRCSUFF = .cpp SRCSUFF = .cpp
OBJSUFF = .o OBJSUFF = .o
FINAL = 1 FINAL = 1
# 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.
ifdef DEBUG
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
# You must comment or uncomment this line to disable/enable python support # You must comment or uncomment this line to disable/enable python support
#KICAD_PYTHON = 1 #KICAD_PYTHON = 1
...@@ -19,7 +39,7 @@ FINAL = 1 ...@@ -19,7 +39,7 @@ FINAL = 1
#endif #endif
ifdef KICAD_PYTHON ifdef KICAD_PYTHON
PYTHON_VERSION=2.3 PYTHON_VERSION=2.5
PYLIBS= -L/usr/lib PYLIBS= -L/usr/lib
PYLIBS+= -L /usr/include/python PYLIBS+= -L /usr/include/python
PYLIBS+= -lpython$(PYTHON_VERSION) PYLIBS+= -lpython$(PYTHON_VERSION)
...@@ -79,11 +99,19 @@ WXSYSLIB_WITH_GL= $(WXPATH)/$(PREFIX_WX_LIBS)-$(LIBVERSION).a \ ...@@ -79,11 +99,19 @@ WXSYSLIB_WITH_GL= $(WXPATH)/$(PREFIX_WX_LIBS)-$(LIBVERSION).a \
-lglib-2.0 -lpangoft2-1.0 -lSM\ -lglib-2.0 -lpangoft2-1.0 -lSM\
-L/usr/lib $(PYLIBS) -L/usr/lib $(PYLIBS)
else else
#or use "standard command" for wxWidgets
ifdef DEBUG
# debug wxWidgets
WXSYSLIB= `wx-config --debug --libs std`
WXSYSLIB_WITH_GL= `wx-config --debug --libs std,gl`
else
# or use "standard command" for wxWidgets
WXSYSLIB= `wx-config --libs std` WXSYSLIB= `wx-config --libs std`
WXSYSLIB_WITH_GL= `wx-config --libs std,gl` WXSYSLIB_WITH_GL= `wx-config --libs std,gl`
endif endif
endif
# attention l'ordre des libairies # attention l'ordre des libairies
LIBS = -L/usr/local/lib -L/usr/X11R6/lib\ LIBS = -L/usr/local/lib -L/usr/X11R6/lib\
......
MAKE = make -f makefile.gtk MAKE = make -f makefile.gtk
KICAD_SUBDIRS = common 3d-viewer eeschema eeschema/plugins pcbnew cvpcb kicad gerbview KICAD_SUBDIRS = common 3d-viewer eeschema eeschema/plugins pcbnew cvpcb kicad gerbview
KICAD_SUBDIRS_BIN = eeschema eeschema/plugins pcbnew cvpcb kicad gerbview KICAD_SUBDIRS_BIN = eeschema eeschema/plugins pcbnew cvpcb kicad gerbview
......
## Makefile for PCBNEW et wxGTK ## Makefile for PCBNEW et wxGTK
CC = gcc
LD = gcc
#DEBUG = 1
# Compiler flags.
ifdef DEBUG
CPPFLAGS = -Wall -g `wx-config --cxxflags`
LDFLAGS = -g
else
CPPFLAGS = -Wall -O2 `wx-config --cxxflags`
LDFLAGS = -s
endif
include ../libs.linux include ../libs.linux
# Additional compiler flags
CPPFLAGS +=
TARGET = pcbnew TARGET = pcbnew
all: $(TARGET) all: $(TARGET)
...@@ -24,7 +17,6 @@ CPPFLAGS += $(EXTRACPPFLAGS) ...@@ -24,7 +17,6 @@ CPPFLAGS += $(EXTRACPPFLAGS)
EDACPPFLAGS = $(CPPFLAGS) EDACPPFLAGS = $(CPPFLAGS)
$(TARGET): $(OBJECTS) makefile.gtk makefile.include $(LIBVIEWER3D) $(EXTRALIBS) ../libs.linux $(TARGET): $(OBJECTS) makefile.gtk makefile.include $(LIBVIEWER3D) $(EXTRALIBS) ../libs.linux
$(LD) $(LDFLAGS) $(OBJECTS) $(LIBVIEWER3D) $(LIBS_WITH_GL)\ $(LD) $(LDFLAGS) $(OBJECTS) $(LIBVIEWER3D) $(LIBS_WITH_GL)\
-o $(TARGET) -o $(TARGET)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment