blob: 74c37d7f101b74fd2fb1bb41b8efeeaa857290c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--- a/Makefile
+++ b/Makefile
@@ -1,9 +1,9 @@
-CFLAGS=
-LDFLAGS= -L/usr/X11R6/lib -lXext -lX11 -lXxf86vm -lXxf86dga
+LIBS= $(shell ${PKG_CONFIG} --libs xext x11 xxf86vm xxf86dga)
+INCLUDES= $(shell ${PKG_CONFIG} --cflags xext x11 xxf86vm xxf86dga)
prefix=/usr
chgres: chgres.o
- $(CC) -o $@ $< $(LDFLAGS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS)
install: chgres
install -D -m 0555 chgres $(prefix)/bin/
@@ -12,4 +12,4 @@
rm -f core chgres.o chgres
.c.o:
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CC) $(CFLAGS) $(INCLUDES) -c $< -o $@
|