diff --git a/common/gestfich.cpp b/common/gestfich.cpp index 4bcb010fc9..616411a48a 100644 --- a/common/gestfich.cpp +++ b/common/gestfich.cpp @@ -38,9 +38,11 @@ static wxString s_HelpPathList[] = { wxT("c:/kicad/help/"), wxT("d:/kicad/help/"), #else + wxT("/usr/share/doc/kicad/"), + wxT("/usr/local/share/doc/kicad/"), + wxT("/usr/local/kicad/share/doc/kicad/"), wxT("/usr/local/kicad/help/"), wxT("/usr/share/doc/kicad/help"), - wxT("/usr/share/doc/kicad/"), #endif wxT("end_list") // End of list symbol, do not change }; @@ -51,8 +53,10 @@ static wxString s_KicadDataPathList[] = { wxT("c:/kicad/"), wxT("d:/kicad/"), #else - wxT("/usr/local/kicad/"), wxT("/usr/share/kicad/"), + wxT("/usr/local/share/kicad/"), + wxT("/usr/local/kicad/share/kicad/"), + wxT("/usr/local/kicad/"), #endif wxT("end_list") // End of list symbol, do not change }; @@ -63,9 +67,10 @@ static wxString s_KicadBinaryPathList[] = { wxT("c:/kicad/winexe/"), wxT("d:/kicad/winexe/"), #else - wxT("/usr/local/kicad/linux/"), - wxT("/usr/local/bin/"), wxT("/usr/bin/"), + wxT("/usr/local/bin/"), + wxT("/usr/local/kicad/bin/"), + wxT("/usr/local/kicad/linux/"), #endif wxT("end_list") // End of list symbol, do not change }; diff --git a/eeschema/plugins/makefile.gtk b/eeschema/plugins/makefile.gtk index 354733e58e..5ed46557a4 100644 --- a/eeschema/plugins/makefile.gtk +++ b/eeschema/plugins/makefile.gtk @@ -18,8 +18,11 @@ all: netlist_form_pads-pcb netlist_form_pads-pcb: netlist_form_pads-pcb.cpp makefile.gtk gcc -D__UNIX__ -Wall netlist_form_pads-pcb.cpp -o netlist_form_pads-pcb $(LIBSTDC) -install: - cp -v netlist_form_pads-pcb $(KICAD_PLUGINS) +$(KICAD_PLUGINS): + mkdir -p $(KICAD_PLUGINS) + +install: $(KICAD_PLUGINS) + cp netlist_form_pads-pcb $(KICAD_PLUGINS) clean : rm -f netlist_form_pads-pcb diff --git a/help/makefile b/help/makefile new file mode 100644 index 0000000000..32288d6ef8 --- /dev/null +++ b/help/makefile @@ -0,0 +1,14 @@ +# Install help files & docs +include ../libs.linux + +TARGETS=de en es fr it pt ru + +install: $(TARGETS) + +$(KICAD_DOCS): + mkdir -p $(KICAD_DOCS) + +$(TARGETS): $(KICAD_DOCS) + cp -R $@ $(KICAD_DOCS) + +.PHONY: $(TARGETS) diff --git a/internat/makefile b/internat/makefile new file mode 100644 index 0000000000..88c4ea00f2 --- /dev/null +++ b/internat/makefile @@ -0,0 +1,14 @@ +# Install GUI translations +include ../libs.linux + +TARGETS=cs de es fr hu it ko pl pt ru sl + +install: $(TARGETS) + +$(KICAD_INTERNAT): + mkdir -p $(KICAD_INTERNAT) + +$(TARGETS): $(KICAD_INTERNAT) + cp -R $@ $(KICAD_INTERNAT) + +.PHONY: $(TARGETS) diff --git a/library/makefile b/library/makefile new file mode 100644 index 0000000000..cc81a12513 --- /dev/null +++ b/library/makefile @@ -0,0 +1,14 @@ +# Install component libraries +include ../libs.linux + +TARGETS=*.dcm *.lib *.sym + +install: $(TARGETS) + +$(KICAD_LIBRARY): + mkdir -p $(KICAD_LIBRARY) + +$(TARGETS): $(KICAD_LIBRARY) + cp -R $@ $(KICAD_LIBRARY) + +.PHONY: $(TARGETS) diff --git a/libs.linux b/libs.linux index 0cb4661677..40f8cff4e2 100644 --- a/libs.linux +++ b/libs.linux @@ -1,7 +1,23 @@ +# +# Configuration for kicad build & install +# -#Configuration for build kicad -KICAD_BIN = /usr/local/kicad -KICAD_PLUGINS = $(KICAD_BIN)/plugins +# Locations for install targets. All can be overriden on the make command. +# Normally you'd only expect to override the PREFIX if you want to install to +# a non standard install dir (or a temp location for packaging). +# For packaging you can override and install anywhere, but to run from a +# non-standard location edit common/gestfich.ccp so it knows where to +# load help/data/etc. files from. +# Current supported PREFIXes are /usr, /usr/local & /usr/local/kicad +PREFIX = /usr +KICAD_BIN = $(PREFIX)/bin +KICAD_PLUGINS = $(PREFIX)/lib/kicad/plugins +KICAD_DOCS=$(PREFIX)/share/doc/kicad +KICAD_DATA=$(PREFIX)/share/kicad +KICAD_MODULES=$(KICAD_DATA)/modules +KICAD_LIBRARY=$(KICAD_DATA)/library +KICAD_INTERNAT=$(KICAD_DATA)/internat +KICAD_TEMPLATE=$(KICAD_DATA)/template # http://www.gnu.org/software/autoconf/manual/make/Catalogue-of-Rules.html#Catalogue-of-Rules CXX = g++ diff --git a/makefile.gtk b/makefile.gtk index cf23f5ca64..15865b34b3 100644 --- a/makefile.gtk +++ b/makefile.gtk @@ -1,19 +1,27 @@ -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 +MAKEGTK = $(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 +KICAD_SUBDIRS_REST = help internat modules template library all: @for dir in $(KICAD_SUBDIRS); do \ - $(MAKE) -C $$dir; \ + $(MAKEGTK) -C $$dir; \ done -install: +install-bin: @for dir in $(KICAD_SUBDIRS_BIN); do \ - $(MAKE) -C $$dir install; \ + $(MAKEGTK) -C $$dir install; \ done - + +install-rest: + @for dir in $(KICAD_SUBDIRS_REST); do \ + $(MAKE) -C $$dir install; \ + done + +install: install-bin install-rest + clean: @for dir in $(KICAD_SUBDIRS); do \ - $(MAKE) -C $$dir clean; \ + $(MAKEGTK) -C $$dir clean; \ done diff --git a/modules/makefile b/modules/makefile new file mode 100644 index 0000000000..b44766ad3a --- /dev/null +++ b/modules/makefile @@ -0,0 +1,14 @@ +# Install modules and 3d models +include ../libs.linux + +TARGETS=*.brd *.equ *.mdc *.mod packages3d + +install: $(TARGETS) + +$(KICAD_MODULES): + mkdir -p $(KICAD_MODULES) + +$(TARGETS): $(KICAD_MODULES) + cp -R $@ $(KICAD_MODULES) + +.PHONY: $(TARGETS) diff --git a/template/makefile b/template/makefile new file mode 100644 index 0000000000..36665b97b8 --- /dev/null +++ b/template/makefile @@ -0,0 +1,14 @@ +# Install template +include ../libs.linux + +TARGETS=kicad.pro + +install: $(TARGETS) + +$(KICAD_TEMPLATE): + mkdir -p $(KICAD_TEMPLATE) + +$(TARGETS): $(KICAD_TEMPLATE) + cp -R $@ $(KICAD_TEMPLATE) + +.PHONY: $(TARGETS)