swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit a928c43892fc117e8597c8288ee24a16e8cd33e8
parent b04ca5bfa7925cbc2b02ffc44b1e7da120696239
Author: Michael Forney <mforney@mforney.org>
Date:   Fri, 25 Oct 2013 01:14:04 -0700

Install pkg-config file

Diffstat:
MMakefile | 22++++++++++++++++++----
Mconfig.mk | 1+
Aswc.pc.in | 14++++++++++++++
3 files changed, 33 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile @@ -5,9 +5,11 @@ all: build VERSION_MAJOR := 0 VERSION_MINOR := 0 +VERSION := $(VERSION_MAJOR).$(VERSION_MINOR) +TARGETS := swc.pc SUBDIRS := launch libswc protocol -CLEAN_FILES := +CLEAN_FILES := $(TARGETS) include config.mk include $(SUBDIRS:%=%/Makefile.local) @@ -33,12 +35,24 @@ link = $(call quiet,CCLD,$(CC)) $(CFLAGS) -o $@ $^ check-dependencies: $(SUBDIRS:%=check-dependencies-%) .PHONY: build -build: $(SUBDIRS:%=build-%) +build: $(SUBDIRS:%=build-%) $(TARGETS) + +swc.pc: swc.pc.in + $(call quiet,GEN, \ + sed -e "s:@VERSION@:$(VERSION):" \ + -e "s:@PREFIX@:$(PREFIX):" \ + -e "s:@LIBDIR@:$(LIBDIR):" \ + -e "s:@INCLUDEDIR@:$(INCLUDEDIR):" \ + $< > $@) + +.PHONY: install-swc.pc +install-swc.pc: swc.pc | $(DESTDIR)$(PKGCONFIGDIR) + install -m0644 $< "$(DESTDIR)$(PKGCONFIGDIR)" .PHONY: install -install: $(SUBDIRS:%=install-%) +install: $(SUBDIRS:%=install-%) $(TARGETS:%=install-%) -$(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCLUDEDIR): +$(DESTDIR)$(BINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCLUDEDIR) $(DESTDIR)$(PKGCONFIGDIR): mkdir -p "$@" .PHONY: clean diff --git a/config.mk b/config.mk @@ -4,6 +4,7 @@ PREFIX = /usr/local BINDIR = $(PREFIX)/bin LIBDIR = $(PREFIX)/lib INCLUDEDIR = $(PREFIX)/include +PKGCONFIGDIR = $(LIBDIR)/pkgconfig CC = gcc CPPFLAGS = -D_GNU_SOURCE # Required for mkostemp diff --git a/swc.pc.in b/swc.pc.in @@ -0,0 +1,14 @@ +prefix=@PREFIX@ +exec_prefix=${prefix} +libdir=@LIBDIR@ +includedir=@INCLUDEDIR@ + +Name: swc +Description: A library for making a simple Wayland compositor +Version: @VERSION@ +Cflags: -I${includedir} +Libs: -L${libdir} -lswc + +Requires: wayland-server +Requires.private: libudev libevdev xkbcommon libdrm pixman-1 wld +