aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/Xft/Imakefile
blob: 4b827be5cf88c16de7034d9760daa5c84fd615d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
XCOMM $XFree86: xc/lib/Xft/Imakefile,v 1.28 2003/11/17 15:18:04 tsi Exp $
XCOMM $XdotOrg: xc/lib/Xft/Imakefile,v 1.5 2005/10/19 02:46:56 kem Exp $

#define DoNormalLib NormalLibXft
#define DoSharedLib SharedLibXft
#define DoExtraLib SharedLibXft
#define DoDebugLib DebugLibXft
#define DoProfileLib ProfileLibXft

#define HasSharedData YES
#define LibName Xft
#define SoRev SOXFTREV
#define IncSubdir X11
#define IncSubSubdir Xft

#include <Threads.tmpl>

#ifndef XftLibDir
#define XftLibDir $(LIBDIR)
#endif

#ifndef XftType1Dir
#define XftType1Dir $(LIBDIR)/fonts/Type1
#endif

#ifdef UseInstalled
/* when using xmkmf, make sure the needed definitions for the fontconfig
 * library are available
 */

#ifndef SharedFontconfigRev
#define SharedFontconfigRev 1.0.4
SharedLibReferences(FONTCONFIG,fontconfig,$(FONTCONFIGLIBSRC),SOFONTCONFIGREV,SharedFontconfigRev)
#endif

/* make sure we're building the right major version */
SOXFTREV=2.1

#endif

XFTLIBDIR=XftLibDir

TYPE1DIR=XftType1Dir
#if HasGcc2 || HasGcc3
WARNINGS=-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs
#endif
INCLUDES=$(FONTCONFIGINCLUDES) $(FREETYPE2INCLUDES) -I$(XBUILDINCDIR) $(WARNINGS)
DEFINES=$(FREETYPE2DEFINES) $(RENDERDEFINES) -DXFREE86_FT2

XFT_REVISION=8
XFT_VERSION=2.1.$(XFT_REVISION)

FREETYPE_LIBS=$(FREETYPE2LIB)
FREETYPE_CFLAGS=$(FREETYPE2INCLUDES)
XRENDER_LIBS=$(XRENDERLIB)
XRENDER_CFLAGS=$(XRENDERINCLUDES)
FONTCONFIG_CFLAGS=$(FONTCONFIGINCLUDES)
FONTCONFIG_LIBS=$(FONTCONFIGLIB)

#if !defined(UseInstalled)

/* these must always be computed using the installed location,
 * when building inside the tree that means extra work
 */
#if BuildFontconfigLibrary
FONTCONFIG_LIBS=-L$(USRLIBDIR) -lfontconfig
FONTCONFIG_CFLAGS=-I$(INCROOT)
#endif

#if BuildFreetype2Library
FREETYPE_LIBS=-L$(USRLIBDIR) -lfreetype
FREETYPE_CFLAGS=-I$(INCROOT)/freetype2
#endif

#if BuildRenderLibrary
XRENDER_LIBS=-L$(USRLIBDIR) -lXrender
XRENDER_CFLAGS=-I$(INCROOT)
#endif

#endif

RPATH_CFLAG = HardCodeLibdirFlag

SUBSTVARS=prefix="$(PROJECTROOT)" \
	  exec_prefix="$(BINDIR)" \
	  libdir="$(USRLIBDIR)" \
	  hardcode_libdir_flag_spec="$(RPATH_CFLAG)" \
	  includedir="$(INCROOT)" \
	  VERSION="$(XFT_VERSION)" \
	  FREETYPE_LIBS="$(FREETYPE_LIBS)" \
	  FREETYPE_CFLAGS="$(FREETYPE_CFLAGS)" \
	  XRENDER_LIBS="$(XRENDER_LIBS)" \
	  XRENDER_CFLAGS="$(XRENDER_CFLAGS)" \
	  FONTCONFIG_CFLAGS="$(FONTCONFIG_CFLAGS)" \
	  FONTCONFIG_LIBS="$(FONTCONFIG_LIBS)"

REQUIREDLIBS=$(LDPRELIBS) $(XRENDERLIB) $(XLIB) $(FONTCONFIGLIB) $(EXPATLIB) $(FREETYPE2LIB)

HEADERS = Xft.h XftCompat.h

   SRCS = xftcolor.c xftdbg.c xftdpy.c \
          xftdraw.c xftextent.c xftfont.c \
          xftinit.c xftlist.c \
          xftname.c xftstr.c xftswap.c xftxlfd.c \
	  xftfreetype.c xftglyphs.c xftrender.c xftcore.c

   OBJS = xftcolor.o xftdbg.o xftdpy.o \
          xftdraw.o xftextent.o xftfont.o \
          xftinit.o xftlist.o \
          xftname.o xftstr.o xftswap.o xftxlfd.o \
	  xftfreetype.o xftglyphs.o xftrender.o xftcore.o

#include <Library.tmpl>

#if DoSharedLib && SharedDataSeparation
SpecialCObjectRule(sharedlib,NullParameter,$(SHLIBDEF))
#endif

#define ConfigSubst(file, old_suffix, new_suffix)		@@\
								@@\
all:: Concat(file,new_suffix)					@@\
								@@\
Concat(file,new_suffix): Concat(file,old_suffix)		@@\
	RemoveFile($@)						@@\
	sh config/config-subst $(SUBSTVARS) < Concat(file,old_suffix) > $@ @@\
								@@\
clean::								@@\
	RemoveFile(Concat(file,new_suffix))

XCOMM Create xft-config.script from xft-config.in
ConfigSubst(xft-config,.in,.script)
InstallScript(xft-config,$(BINDIR))

XCOMM Create xft.pc from xft.pc.in
ConfigSubst(xft.pc,.in,/*none*/)
InstallNonExecFile(xft.pc,$(USRLIBDIR)/pkgconfig)

XCOMM Create man pages from .*.in files
ConfigSubst(xft-config,.1.in,.man)
ConfigSubst(Xft,.3.in,.man)

InstallGenManPage(xft-config,$(MANDIR),$(MANSUFFIX))
InstallGenManPage(Xft,$(LIBMANDIR),$(LIBMANSUFFIX))

DependTarget()