54 lines
1.7 KiB
Diff
54 lines
1.7 KiB
Diff
From 5b95fca0be36e0e57f65975cf5b295e1937bbbf4 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
|
|
Date: Wed, 2 Aug 2017 21:08:36 +0200
|
|
Subject: [PATCH] Align Makefile
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
* don't hardcode g++
|
|
* make ldconfig work on installed directory only
|
|
* use pkgconfig to find freetype2
|
|
* do not add host path to compiler/linker
|
|
|
|
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
|
|
---
|
|
Makefile | 8 ++++----
|
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/Makefile b/Makefile
|
|
index 2b29cbf..0811df9 100644
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -31,8 +31,8 @@ MINVERS = 9.0
|
|
VERSION = $(MAJVERS).$(MINVERS)
|
|
|
|
|
|
-CPPFLAGS += -Wall -I. -I/usr/X11R6/include `freetype-config --cflags` -fpic -DVERSION=\"$(VERSION)\" -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -O2
|
|
-LDFLAGS += -L/usr/X11R6/$(LIBDIR) `freetype-config --libs`
|
|
+CPPFLAGS += -Wall -I. `pkg-config --cflags freetype2` -fpic -DVERSION=\"$(VERSION)\" -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -O2
|
|
+LDFLAGS += `pkg-config --libs freetype2`
|
|
LDLIBS +=
|
|
|
|
|
|
@@ -46,14 +46,14 @@ CLXCLIENT_H = clxclient.h
|
|
|
|
|
|
$(CLXCLIENT_MIN): $(CLXCLIENT_O)
|
|
- g++ -shared $(LDFLAGS) -Wl,-soname,$(CLXCLIENT_MAJ) -o $(CLXCLIENT_MIN) $(CLXCLIENT_O) $(CLXCLIENT_DEP)
|
|
+ $(CXX) -shared $(LDFLAGS) -Wl,-soname,$(CLXCLIENT_MAJ) -o $(CLXCLIENT_MIN) $(CLXCLIENT_O) $(CLXCLIENT_DEP)
|
|
|
|
|
|
install: $(CLXCLIENT_MIN)
|
|
install -d $(PREFIX)/$(LIBDIR)
|
|
install -m 644 $(CLXCLIENT_H) $(PREFIX)/include
|
|
install -m 755 $(CLXCLIENT_MIN) $(PREFIX)/$(LIBDIR)
|
|
- ldconfig
|
|
+ ldconfig -n $(DESTDIR)$(PREFIX)/$(LIBDIR)
|
|
ln -sf $(CLXCLIENT_MIN) $(PREFIX)/$(LIBDIR)/$(CLXCLIENT_SO)
|
|
|
|
|
|
--
|
|
2.14.3
|
|
|