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

Much easier now to compile with debugging symbols enabled.
This commit is contained in:
dickelbeck 2007-06-14 16:28:05 +00:00
parent b5ef09621f
commit dc7235c769
9 changed files with 59 additions and 61 deletions

View File

@ -1,14 +1,10 @@
## 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
# Compiler flags.
CPPFLAGS += -DPCBNEW -I../pcbnew -I ../include -I../common
TARGET = 3d-viewer
FINAL = 1

View File

@ -1,15 +1,16 @@
## Makefile for common.a
CC = gcc
include ../libs.linux
# Compiler flags.
CPPFLAGS = -Wall -O2 -I./ -I../include `wx-config --cflags`
CPPFLAGS += -I./ -I../include
EDACPPFLAGS = $(CPPFLAGS)
all: common.a
include ../libs.linux
include makefile.include
CPPFLAGS += $(EXTRACPPFLAGS) -fno-strict-aliasing

View File

@ -1,21 +1,14 @@
# File: makefile
# Compiler flags.
CC = gcc
LD = gcc
FINAL = 1
# Compiler flags.
CPPFLAGS = -Wall -O2 `wx-config --cxxflags`
LDFLAGS = -s
EDACPPFLAGS = $(CPPFLAGS)
include ../libs.linux
# Compiler flags.
CPPFLAGS +=
EDACPPFLAGS = $(CPPFLAGS)
TARGET = cvpcb

View File

@ -1,20 +1,15 @@
## Makefile for eeschema
CC = gcc
#LD = c++ pour utiliser libstdc++ dynamique
LD = gcc
FINAL = 1
LDFLAGS = -s
include ../libs.linux
# Additional compiler flags
CPPFLAGS +=
TARGET = eeschema
CPPFLAGS = -Wall -O2 `wx-config --cxxflags`
all: $(TARGET)

View File

@ -1,14 +1,11 @@
## Makefile for GERBVIEW et wxGTK
CC = gcc
LD = gcc
# Compiler flags.
CPPFLAGS = -Wall -O2 `wx-config --cxxflags`
LDFLAGS = -s
include ../libs.linux
# Additional compiler flags.
CPPFLAGS +=
TARGET = gerbview
@ -34,5 +31,4 @@ clean:
rm -f *.map
rm -f $(TARGET)

View File

@ -1,17 +1,13 @@
# File: makefile for kicad, wxGTK
# Compiler flags.
CC = gcc
LD = gcc
FINAL = 1
# Compiler flags.
CPPFLAGS = -Wall -O2 `wx-config --cxxflags`
LDFLAGS = -s
include ../libs.linux
# Additional compiler flags
CPPFLAGS +=
FINAL = 1
TARGET = kicad
all: $(TARGET)

View File

@ -3,11 +3,31 @@
KICAD_BIN = /usr/local/kicad
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
OBJSUFF = .o
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
#KICAD_PYTHON = 1
@ -19,7 +39,7 @@ FINAL = 1
#endif
ifdef KICAD_PYTHON
PYTHON_VERSION=2.3
PYTHON_VERSION=2.5
PYLIBS= -L/usr/lib
PYLIBS+= -L /usr/include/python
PYLIBS+= -lpython$(PYTHON_VERSION)
@ -79,11 +99,19 @@ WXSYSLIB_WITH_GL= $(WXPATH)/$(PREFIX_WX_LIBS)-$(LIBVERSION).a \
-lglib-2.0 -lpangoft2-1.0 -lSM\
-L/usr/lib $(PYLIBS)
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_WITH_GL= `wx-config --libs std,gl`
endif
endif
# attention à l'ordre des libairies
LIBS = -L/usr/local/lib -L/usr/X11R6/lib\

View File

@ -1,3 +1,4 @@
MAKE = make -f makefile.gtk
KICAD_SUBDIRS = common 3d-viewer eeschema eeschema/plugins pcbnew cvpcb kicad gerbview
KICAD_SUBDIRS_BIN = eeschema eeschema/plugins pcbnew cvpcb kicad gerbview

View File

@ -1,19 +1,12 @@
## 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
# Additional compiler flags
CPPFLAGS +=
TARGET = pcbnew
all: $(TARGET)
@ -24,7 +17,6 @@ CPPFLAGS += $(EXTRACPPFLAGS)
EDACPPFLAGS = $(CPPFLAGS)
$(TARGET): $(OBJECTS) makefile.gtk makefile.include $(LIBVIEWER3D) $(EXTRALIBS) ../libs.linux
$(LD) $(LDFLAGS) $(OBJECTS) $(LIBVIEWER3D) $(LIBS_WITH_GL)\
-o $(TARGET)