From: Jakob Gruber Date: Mon, 10 Sep 2012 09:38:23 +0000 (+0200) Subject: Makefiles: Separate simavr.pc and simavr-avr.pc X-Git-Tag: v1.0~5 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=31e9a0ab40f0add1b0ee6db40211c5fe7bec5585;p=sx%2Fsimavr.git Makefiles: Separate simavr.pc and simavr-avr.pc According to http://people.freedesktop.org/~dbn/pkg-config-guide.html, "each pkg-config file is best used to describe a single library, so each package should have at least as many pkg-config files as they do installed libraries." --- diff --git a/simavr/Makefile b/simavr/Makefile index f701b0b..afaae9f 100644 --- a/simavr/Makefile +++ b/simavr/Makefile @@ -92,6 +92,8 @@ install : all $(MKDIR) $(DESTDIR)/lib $(INSTALL) ${OBJ}/libsimavr.a $(DESTDIR)/lib/ $(MKDIR) $(DESTDIR)/lib/pkgconfig/ + sed -e "s|PREFIX|${PREFIX}|g" -e "s|VERSION|${SIMAVR_VERSION}|g" \ + simavr-avr.pc >$(DESTDIR)/lib/pkgconfig/simavr-avr.pc sed -e "s|PREFIX|${PREFIX}|g" -e "s|VERSION|${SIMAVR_VERSION}|g" \ simavr.pc >$(DESTDIR)/lib/pkgconfig/simavr.pc ifeq (${shell uname}, Linux) diff --git a/simavr/simavr-avr.pc b/simavr/simavr-avr.pc new file mode 100644 index 0000000..c017918 --- /dev/null +++ b/simavr/simavr-avr.pc @@ -0,0 +1,13 @@ +prefix=PREFIX +exec_prefix=${prefix} +includedir=${prefix}/include +libdir=${exec_prefix}/lib + +Name: simavr-avr +Description: Atmel(tm) AVR 8 bits simulator - avr-gcc flags +Version: VERSION +Cflags: -I${includedir}/avr -ffunction-sections -fdata-sections \ + -Wl,--relax,--gc-sections \ + -Wl,--undefined=_mmcu,--section-start=.mmcu=0x910000 +Libs: + diff --git a/simavr/simavr.pc b/simavr/simavr.pc index c1e9ba9..3c5d3b3 100644 --- a/simavr/simavr.pc +++ b/simavr/simavr.pc @@ -1,4 +1,3 @@ -simavr.pc: prefix=PREFIX exec_prefix=${prefix} includedir=${prefix}/include @@ -9,18 +8,3 @@ Description: Atmel(tm) AVR 8 bits simulator Version: VERSION Cflags: -I${includedir} Libs: -L${libdir} -lsimavr -lelf - -simavr-avr.pc: -prefix=PREFIX -exec_prefix=${prefix} -includedir=${prefix}/include -libdir=${exec_prefix}/lib - -Name: simavr-avr -Description: Atmel(tm) AVR 8 bits simulator - avr-gcc flags -Version: VERSION -Cflags: -I${includedir}/avr -ffunction-sections -fdata-sections \ - -Wl,--relax,--gc-sections \ - -Wl,--undefined=_mmcu,--section-start=.mmcu=0x910000 -Libs: -