diff --git a/Makefile b/Makefile index 94845ea..ced453d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,11 @@ +include Makefile.setup +include config.mk + .PHONY : test -all: config.mk +pkgconfigs = egl.pc gles_cm.pc glesv2.pc + +all: config.mk $(pkgconfigs) $(MAKE) -C include $(MAKE) -C lib @@ -16,12 +21,17 @@ clean: $(MAKE) -C test clean $(MAKE) -C lib clean $(MAKE) -C include clean - rm -f config.mk + rm -f config.mk $(pkgconfigs) -install: config.mk +install: all config.mk $(MAKE) -C lib install $(MAKE) -C include install - $(MAKE) -f Makefile.pc + $(MKDIR) $(libdir)/pkgconfig + $(INSTALL_DATA) $(pkgconfigs) $(libdir)/pkgconfig test: config.mk $(MAKE) -C test test + +%.pc: %.pc.in + echo "prefix=$(prefix)" > $@ + sed -i "s/MVERSION/${MALI_VERSION}/g" $^ >> $@ diff --git a/Makefile.pc b/Makefile.pc deleted file mode 100644 index c51d18c..0000000 --- a/Makefile.pc +++ /dev/null @@ -1,21 +0,0 @@ -include Makefile.setup -include config.mk - -all: - echo "prefix=$(prefix)" > egl.pc - cat egl.pc.in >> egl.pc - sed -i "s/MVERSION/${MALI_VERSION}/g" egl.pc - echo "prefix=$(prefix)" > gles_cm.pc - cat gles_cm.pc.in >> gles_cm.pc - sed -i "s/MVERSION/${MALI_VERSION}/g" gles_cm.pc - echo "prefix=$(prefix)" > glesv2.pc - cat glesv2.pc.in >> glesv2.pc - sed -i "s/MVERSION/${MALI_VERSION}/g" glesv2.pc - -install: egl.pc gles_cm.pc glesv2.pc - $(MKDIR) $(libdir)/pkgconfig - $(INSTALL_DATA) $^ $(libdir)/pkgconfig - -clean: - $(RM) egl.pc gles_cm.pc glesv2.pc -