blob: 80e219edc6a80b114b61ef6f92134fd5cfd03a98 (
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
|
--- a/Makefile
+++ b/Makefile
@@ -11,14 +11,13 @@
#=========================== C compiler configuration ==========================
-CC = gcc
-CFLAGS = -I/usr/X11R6/include -O2
+CFLAGS += $(shell pkg-config --cflags x11 xext)
#============================= Linker configuration ============================
-LINK = gcc
-LFLAGS = -L/usr/X11R6/lib
-LIBS = -lm -lX11 -lXext
+LINK = $(CC)
+LFLAGS = $(LDFLAGS)
+LIBS = -lm $(shell pkg-config --libs x11 xext)
#============================ Installer configuration ==========================
--- a/xdwapi/Makefile
+++ b/xdwapi/Makefile
@@ -1,10 +1,9 @@
# Makefile for the xdesktopwaves API and its demo program
-CC = gcc
-CFLAGS = -I/usr/X11R6/include -O2
-LINK = gcc
-LFLAGS = -L/usr/X11R6/lib
-LIBS = -lm -lX11
+CFLAGS += $(shell pkg-config --cflags x11 xext)
+LINK = $(CC)
+LFLAGS = $(LDFLAGS)
+LIBS = -lm $(shell pkg-config --libs x11 xext)
all: xdwapidemo
|