|
|
libs.dynamic | libs.dynamic |
|
|
CC = `wx-config --cc` |
CC = `wx-config --cc` |
# Note: at least on Debian using gcc gives a smaller binary than using: |
# Note: at least on Debian using gcc gives a smaller binary than using: |
# `wx-config --ld` |
# `wx-config --ld` |
LD = gcc |
LD = gcc |
|
|
SRCSUFF = .cpp |
SRCSUFF = .cpp |
OBJSUFF = .o |
OBJSUFF = .o |
FINAL = 1 |
FINAL = 1 |
|
|
WXPATH = `wx-config --prefix`/lib |
WXPATH = `wx-config --prefix`/lib |
PREFIX_WX_LIBS = `wx-config --basename` |
PREFIX_WX_LIBS = `wx-config --basename` |
SUFFIX_WX_LIBGL = _gl-$(LIBVERSION) |
SUFFIX_WX_LIBGL = _gl-$(LIBVERSION) |
|
|
LIBSTDC = -lstdc++ |
LIBSTDC = -lstdc++ |
LIBVERSION=`wx-config --release` |
LIBVERSION=`wx-config --release` |
WXSYSLIB= `wx-config --libs` |
WXSYSLIB= `wx-config --libs` |
|
|
# 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\ |
$(EXTRALIBS) $(WXSYSLIB)\ |
$(EXTRALIBS) $(WXSYSLIB)\ |
$(LIBSTDC) |
$(LIBSTDC) |
|
|
LIBS3D = -l$(PREFIX_WX_LIBS)$(SUFFIX_WX_LIBGL) -lGL -lGLU |
LIBS3D = -l$(PREFIX_WX_LIBS)$(SUFFIX_WX_LIBGL) -lGL -lGLU |
|
|
# Sub-projects |
# Sub-projects |
KICAD_SUBDIRS = common 3d-viewer eeschema pcbnew cvpcb kicad gerbview wxhtml |
KICAD_SUBDIRS = common 3d-viewer eeschema pcbnew cvpcb kicad gerbview wxhtml |
# How to invoke make |
# How to invoke make |
MAKE := $(MAKE) -f makefile.gtk |
MAKE := $(MAKE) -f makefile.gtk |
# File with the libraries definitions |
# File with the libraries definitions |
LIBSDEF = libs.dynamic |
LIBSDEF = libs.dynamic |
# Prefix, can be from command line |
# Prefix, can be from command line |
ifneq ($(strip $(prefix)),) |
ifneq ($(strip $(prefix)),) |
IPREFIX=$(prefix) |
IPREFIX=$(prefix) |
else |
else |
IPREFIX=/usr/local/kicad/linux |
IPREFIX=/usr/local/kicad/linux |
endif |
endif |
# Install tool, can be from command line |
# Install tool, can be from command line |
ifeq ($(INSTALL),) |
ifeq ($(INSTALL),) |
INSTALL=install |
INSTALL=install |
endif |
endif |
# C Flags, can be from command line |
# C Flags, can be from command line |
ifeq ($(CFLAGS),) |
ifeq ($(CFLAGS),) |
CFLAGS=-Wall -O2 |
CFLAGS=-Wall |
#CFLAGS=-Wall -Werror -g3 |
#CFLAGS=-Wall -Werror -g3 |
endif |
endif |
CFLAGS:=$(CFLAGS) `wx-config --cxxflags` |
CFLAGS:=$(CFLAGS) `wx-config --cxxflags` |
# Linker flags (strip) |
# Linker flags (strip) |
LDFLAGS = -s |
LDFLAGS = -s |
export |
export |
|
|
.PHONY: $(KICAD_SUBDIRS) |
.PHONY: $(KICAD_SUBDIRS) |
|
|
all: $(KICAD_SUBDIRS) |
all: $(KICAD_SUBDIRS) |
|
|
common: |
common: |
cd $@ ; $(MAKE) |
cd $@ ; $(MAKE) |
|
|
3d-viewer: |
3d-viewer: |
cd $@ ; $(MAKE) |
cd $@ ; $(MAKE) |
|
|
eeschema: |
eeschema: |
cd $@ ; $(MAKE) |
cd $@ ; $(MAKE) |
|
|
pcbnew: |
pcbnew: |
cd $@ ; $(MAKE) |
cd $@ ; $(MAKE) |
|
|
cvpcb: |
cvpcb: |
cd $@ ; $(MAKE) |
cd $@ ; $(MAKE) |
|
|
kicad: |
kicad: |
cd $@ ; $(MAKE) |
cd $@ ; $(MAKE) |
|
|
gerbview: |
gerbview: |
cd $@ ; $(MAKE) |
cd $@ ; $(MAKE) |
|
|
wxhtml: |
wxhtml: |
cd $@ ; $(MAKE) |
cd $@ ; $(MAKE) |
|
|
install: |
install: |
@for d in $(KICAD_SUBDIRS); do (cd $$d && $(MAKE) install); done |
@for d in $(KICAD_SUBDIRS); do (cd $$d && $(MAKE) install); done |
|
|
clean: |
clean: |
@for d in $(KICAD_SUBDIRS); do (cd $$d && $(MAKE) clean); done |
@for d in $(KICAD_SUBDIRS); do (cd $$d && $(MAKE) clean); done |
|
|
3d-viewer/makefile.gtk | 3d-viewer/makefile.gtk |
## Makefile for 3d-viewer.a ( wxGTK - LINUX ) |
## Makefile for 3d-viewer.a ( wxGTK - LINUX ) |
|
|
# Compiler flags. |
# Compiler flags. |
CPPFLAGS = $(CFLAGS) -DPCBNEW -I../pcbnew -I ../include -I../common |
CPPFLAGS = $(CFLAGS) -DPCBNEW -I../pcbnew -I ../include -I../common |
|
|
include ../$(LIBSDEF) |
include ../$(LIBSDEF) |
|
|
TARGET = 3d-viewer |
TARGET = 3d-viewer |
|
|
all: $(TARGET).a |
all: $(TARGET).a |
|
|
include makefile.include |
include makefile.include |
|
|
$(TARGET).a: $(OBJECTS3D) makefile.gtk makefile.include |
$(TARGET).a: $(OBJECTS3D) makefile.gtk makefile.include |
rm -f $@ |
rm -f $@ |
ar -rv $@ $(OBJECTS3D) |
ar -rv $@ $(OBJECTS3D) |
ranlib $@ |
ranlib $@ |
|
|
clean: |
clean: |
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj 2> /dev/null |
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj 2> /dev/null |
|
|
# No install target |
# No install target |
|
|
## Makefile for common.a |
## Makefile for common.a |
|
|
# Compiler flags. |
# Compiler flags. |
CPPFLAGS = $(CFLAGS) -I./ -I../include |
CPPFLAGS = $(CFLAGS) -I./ -I../include |
EDACPPFLAGS = $(CPPFLAGS) |
EDACPPFLAGS = $(CPPFLAGS) |
|
|
all: common.a |
all: common.a |
|
|
include makefile.include |
include makefile.include |
|
|
CPPFLAGS += $(EXTRACPPFLAGS) |
CPPFLAGS += $(EXTRACPPFLAGS) |
EDACPPFLAGS = $(CPPFLAGS) |
EDACPPFLAGS = $(CPPFLAGS) |
|
|
|
|
common.a: $(OBJECTS) makefile.gtk makefile.include |
common.a: $(OBJECTS) makefile.gtk makefile.include |
rm -f $@ |
rm -f $@ |
ar -rv $@ $(OBJECTS) |
ar -rv $@ $(OBJECTS) |
ranlib $@ |
ranlib $@ |
|
|
|
|
clean: |
clean: |
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj 2> /dev/null |
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj 2> /dev/null |
|
|
# No install target |
# No install target |
|
|
# File: makefile |
# File: makefile |
|
|
# Compiler flags. |
# Compiler flags. |
CPPFLAGS = $(CFLAGS) |
CPPFLAGS = $(CFLAGS) |
EDACPPFLAGS = $(CPPFLAGS) |
EDACPPFLAGS = $(CPPFLAGS) |
|
|
include ../$(LIBSDEF) |
include ../$(LIBSDEF) |
|
|
|
|
TARGET = cvpcb |
TARGET = cvpcb |
|
|
all: $(TARGET) |
all: $(TARGET) |
|
|
include makefile.include |
include makefile.include |
|
|
CPPFLAGS += $(EXTRACPPFLAGS) |
CPPFLAGS += $(EXTRACPPFLAGS) |
EDACPPFLAGS = $(CPPFLAGS) |
EDACPPFLAGS = $(CPPFLAGS) |
|
|
|
|
$(TARGET): $(OBJECTS) makefile.gtk makefile.include $(EXTRALIBS) ../$(LIBSDEF) $(LIBVIEWER3D) |
$(TARGET): $(OBJECTS) makefile.gtk makefile.include $(EXTRALIBS) ../$(LIBSDEF) $(LIBVIEWER3D) |
$(LD) $(OBJECTS) $(LDFLAGS) $(LIBS) $(LIBVIEWER3D) $(LIBS3D) -o $(TARGET) |
$(LD) $(OBJECTS) $(LDFLAGS) $(LIBS) $(LIBVIEWER3D) $(LIBS3D) -o $(TARGET) |
|
|
install: |
install: |
$(INSTALL) -d -m 0755 $(IPREFIX) |
$(INSTALL) -d -m 0755 $(IPREFIX) |
$(INSTALL) -m 0755 $(TARGET) $(IPREFIX) |
$(INSTALL) -m 0755 $(TARGET) $(IPREFIX) |
|
|
clean: |
clean: |
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj $(TARGET) 2> /dev/null |
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj $(TARGET) 2> /dev/null |
|
|
## Makefile for eeschema |
## Makefile for eeschema |
|
|
include ../$(LIBSDEF) |
include ../$(LIBSDEF) |
|
|
TARGET = eeschema |
TARGET = eeschema |
|
|
CPPFLAGS = $(CFLAGS) |
CPPFLAGS = $(CFLAGS) |
|
|
all: $(TARGET) |
all: $(TARGET) |
|
|
include makefile.include |
include makefile.include |
|
|
CPPFLAGS += $(EXTRACPPFLAGS) |
CPPFLAGS += $(EXTRACPPFLAGS) |
EDACPPFLAGS = $(CPPFLAGS) |
EDACPPFLAGS = $(CPPFLAGS) |
|
|
$(TARGET): $(OBJECTS) makefile.gtk makefile.include $(EXTRALIBS) ../$(LIBSDEF) |
$(TARGET): $(OBJECTS) makefile.gtk makefile.include $(EXTRALIBS) ../$(LIBSDEF) |
$(LD) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $(TARGET) |
$(LD) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $(TARGET) |
|
|
install: |
install: |
$(INSTALL) -d -m 0755 $(IPREFIX) |
$(INSTALL) -d -m 0755 $(IPREFIX) |
$(INSTALL) -m 0755 $(TARGET) $(IPREFIX) |
$(INSTALL) -m 0755 $(TARGET) $(IPREFIX) |
|
|
clean: |
clean: |
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj $(TARGET) 2> /dev/null |
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj $(TARGET) 2> /dev/null |
|
|
|
|
## Makefile for GERBVIEW et wxGTK |
## Makefile for GERBVIEW et wxGTK |
|
|
# Compiler flags. |
# Compiler flags. |
CPPFLAGS = $(CFLAGS) |
CPPFLAGS = $(CFLAGS) |
|
|
EXTRALIBS = ../common/common.a |
EXTRALIBS = ../common/common.a |
include ../$(LIBSDEF) |
include ../$(LIBSDEF) |
|
|
|
|
TARGET = gerbview |
TARGET = gerbview |
|
|
all: $(TARGET) |
all: $(TARGET) |
|
|
include makefile.include |
include makefile.include |
|
|
CPPFLAGS += $(EXTRACPPFLAGS) |
CPPFLAGS += $(EXTRACPPFLAGS) |
EDACPPFLAGS = $(CPPFLAGS) |
EDACPPFLAGS = $(CPPFLAGS) |
|
|
|
|
$(TARGET): $(OBJECTS) makefile.gtk makefile.include $(EXTRALIBS) ../$(LIBSDEF) |
$(TARGET): $(OBJECTS) makefile.gtk makefile.include $(EXTRALIBS) ../$(LIBSDEF) |
$(LD) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $(TARGET) |
$(LD) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $(TARGET) |
|
|
install: |
install: |
$(INSTALL) -d -m 0755 $(IPREFIX) |
$(INSTALL) -d -m 0755 $(IPREFIX) |
$(INSTALL) -m 0755 $(TARGET) $(IPREFIX) |
$(INSTALL) -m 0755 $(TARGET) $(IPREFIX) |
|
|
clean: |
clean: |
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj $(TARGET) 2> /dev/null |
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj $(TARGET) 2> /dev/null |
|
|
# File: makefile for kicad, wxGTK |
# File: makefile for kicad, wxGTK |
|
|
# Compiler flags. |
# Compiler flags. |
CPPFLAGS = $(CFLAGS) |
CPPFLAGS = $(CFLAGS) |
|
|
include ../$(LIBSDEF) |
include ../$(LIBSDEF) |
|
|
TARGET = kicad |
TARGET = kicad |
|
|
all: $(TARGET) |
all: $(TARGET) |
|
|
include makefile.include |
include makefile.include |
|
|
CPPFLAGS += $(EXTRACPPFLAGS) |
CPPFLAGS += $(EXTRACPPFLAGS) |
EDACPPFLAGS = $(CPPFLAGS) |
EDACPPFLAGS = $(CPPFLAGS) |
|
|
|
|
$(TARGET): $(OBJECTS) makefile.gtk $(EXTRALIBS) ../$(LIBSDEF) |
$(TARGET): $(OBJECTS) makefile.gtk $(EXTRALIBS) ../$(LIBSDEF) |
$(LD) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $(TARGET) |
$(LD) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $(TARGET) |
|
|
install: |
install: |
$(INSTALL) -d -m 0755 $(IPREFIX) |
$(INSTALL) -d -m 0755 $(IPREFIX) |
$(INSTALL) -m 0755 $(TARGET) $(IPREFIX) |
$(INSTALL) -m 0755 $(TARGET) $(IPREFIX) |
|
|
clean: |
clean: |
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj $(TARGET) 2> /dev/null |
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj $(TARGET) 2> /dev/null |
|
|
## Makefile for PCBNEW et wxGTK |
## Makefile for PCBNEW et wxGTK |
|
|
# Compiler flags. |
# Compiler flags. |
CPPFLAGS = $(CFLAGS) |
CPPFLAGS = $(CFLAGS) |
|
|
include ../$(LIBSDEF) |
include ../$(LIBSDEF) |
|
|
TARGET = pcbnew |
TARGET = pcbnew |
|
|
all: $(TARGET) |
all: $(TARGET) |
|
|
include makefile.include |
include makefile.include |
|
|
CPPFLAGS += $(EXTRACPPFLAGS) |
CPPFLAGS += $(EXTRACPPFLAGS) |
EDACPPFLAGS = $(CPPFLAGS) |
EDACPPFLAGS = $(CPPFLAGS) |
|
|
$(TARGET): $(OBJECTS) makefile.gtk makefile.include $(LIBVIEWER3D) $(EXTRALIBS) ../$(LIBSDEF) |
$(TARGET): $(OBJECTS) makefile.gtk makefile.include $(LIBVIEWER3D) $(EXTRALIBS) ../$(LIBSDEF) |
$(LD) $(LDFLAGS) $(OBJECTS) $(LIBS) $(LIBVIEWER3D) $(LIBS3D)\ |
$(LD) $(LDFLAGS) $(OBJECTS) $(LIBS) $(LIBVIEWER3D) $(LIBS3D)\ |
-o $(TARGET) |
-o $(TARGET) |
|
|
install: |
install: |
$(INSTALL) -d -m 0755 $(IPREFIX) |
$(INSTALL) -d -m 0755 $(IPREFIX) |
$(INSTALL) -m 0755 $(TARGET) $(IPREFIX) |
$(INSTALL) -m 0755 $(TARGET) $(IPREFIX) |
|
|
clean: |
clean: |
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj $(TARGET) 2> /dev/null |
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj $(TARGET) 2> /dev/null |
|
|
######################################################################## |
######################################################################## |
######################################################################## |
######################################################################## |
|
|
# Compiler flags. |
# Compiler flags. |
CPPFLAGS = $(CFLAGS) -I./ -I../include -I../common |
CPPFLAGS = $(CFLAGS) -I./ -I../include -I../common |
|
|
EXTRALIBS = |
EXTRALIBS = |
|
|
include ../$(LIBSDEF) |
include ../$(LIBSDEF) |
|
|
TARGET = wxhtml |
TARGET = wxhtml |
|
|
OBJDIR = |
OBJDIR = |
OBJSUFF = o |
OBJSUFF = o |
|
|
.SUFFIXES: .cpp .h .o .cc |
.SUFFIXES: .cpp .h .o .cc |
.cpp.o : |
.cpp.o : |
$(CC) -c $< -o $(<:.cpp=.o) $(CPPFLAGS) |
$(CC) -c $< -o $(<:.cpp=.o) $(CPPFLAGS) |
|
|
|
|
DEPEND = |
DEPEND = |
|
|
|
|
OBJECTS = $(TARGET).o helpfrm.o |
OBJECTS = $(TARGET).o helpfrm.o |
|
|
|
|
$(TARGET): $(OBJECTS) makefile.gtk ../common/common.a ../$(LIBSDEF) |
$(TARGET): $(OBJECTS) makefile.gtk ../common/common.a ../$(LIBSDEF) |
$(LD) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $(TARGET) |
$(LD) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $(TARGET) |
|
|
install: |
install: |
$(INSTALL) -d -m 0755 $(IPREFIX) |
$(INSTALL) -d -m 0755 $(IPREFIX) |
$(INSTALL) -m 0755 $(TARGET) $(IPREFIX) |
$(INSTALL) -m 0755 $(TARGET) $(IPREFIX) |
|
|
clean: |
clean: |
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj $(TARGET) 2> /dev/null |
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj $(TARGET) 2> /dev/null |
|
|