summaryrefslogtreecommitdiff
blob: 2bada877b17a49bb3cf9fa16caba570a3d1b6a03 (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
--- a/config.mk
+++ b/config.mk
@@ -4,10 +4,10 @@
 # Customize below to fit your system
 
 # paths
-PREFIX?= /usr/local
+PREFIX?= /usr
 BINPREFIX?= ${PREFIX}/bin
 MANPREFIX?= ${PREFIX}/share/man
-CONFPREFIX?= ${PREFIX}/share/examples
+CONFPREFIX?= ${PREFIX}/share/echinus
 DOCPREFIX?= ${PREFIX}/share/doc
 CONF?= ${CONFPREFIX}
 
@@ -15,14 +15,13 @@
 X11LIB?= /usr/X11R6/lib
 
 # includes and libs
-INCS = -I. -I/usr/include -I${X11INC} `pkg-config --cflags xft`
-LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 `pkg-config --libs xft`
-
-DEFS = -DVERSION=\"${VERSION}\" -DSYSCONFPATH=\"${CONF}\"
+CFLAGS += -I. -I/usr/include `pkg-config --cflags x11 xft`
+LIBS 	 += -L/usr/lib -lc `pkg-config --libs x11 xft`
+CPPFLAGS += -DVERSION=\"${VERSION}\" -DSYSCONFPATH=\"${CONF}\"
 
 # flags
-CFLAGS = -Os ${INCS} ${DEFS}
-LDFLAGS = -s ${LIBS}
+#CFLAGS = -Os ${INCS} ${DEFS}
+#LDFLAGS = -s ${LIBS}
 # debug flags
 #CFLAGS = -g3 -ggdb3 -std=c99 -pedantic -O0 ${INCS} -DDEBUG ${DEFS}
 #LDFLAGS = -g3 -ggdb3 ${LIBS}
@@ -35,9 +34,11 @@
 #CFLAGS += -save-temps    # Keep precompiler output (great for debugging).
 
 # XRandr (multihead support). Comment out to disable.
-CFLAGS += -DXRANDR=1
-LIBS += -lXrandr
-
+ifdef MULTIHEAD
+CPPFLAGS += -DXRANDR=1
+LIBS += `pkg-config --libs xrandr`
+CCFLAGS += `pkg-config --libs xrandr`
+endif
 # Solaris
 #CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
 #LDFLAGS = ${LIBS}
--- a/echinus.1
+++ b/echinus.1
@@ -40,7 +40,7 @@
 loads the configuration file from
 .Pa ~/.echinus/echinusrc,
 if present, then looks for the system-wide configuration file
-.Pa CONFDIR/echinusrc .
+.Pa /usr/share/echinus/echinusrc .
 .El
 .Pp
 The following notation is used in this page:
--- a/Makefile
+++ b/Makefile
@@ -19,13 +19,13 @@
 
 .c.o:
 	@echo CC $<
-	@${CC} -c ${CFLAGS} $<
+	${CC} ${CPPFLAGS} -c ${CFLAGS} $<
 
 ${OBJ}: config.mk ${HEADERS}
 
 echinus: ${OBJ} ${SRC} ${HEADERS}
 	@echo CC -o $@
-	@${CC} -o $@ ${OBJ} ${LDFLAGS}
+	${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${OBJ} ${LIBS}
 
 clean:
 	@echo cleaning
--- a/README
+++ b/README
@@ -22,7 +22,7 @@
 On new install:
 
 % mkdir ~/.echinus
-% cp -r CONFDIR ~/.echinus
+% cp -r /usr/share/echinus ~/.echinus
 
 1.Configuration file
 --------------------