progman.exe^H^H^H^H
1#
2# Copyright 2020 joshua stein <jcs@jcs.org>
3#
4# Permission is hereby granted, free of charge, to any person obtaining
5# a copy of this software and associated documentation files (the
6# "Software"), to deal in the Software without restriction, including
7# without limitation the rights to use, copy, modify, merge, publish,
8# distribute, sublicense, and/or sell copies of the Software, and to
9# permit persons to whom the Software is furnished to do so, subject to
10# the following conditions:
11#
12# The above copyright notice and this permission notice shall be
13# included in all copies or substantial portions of the Software.
14#
15# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
18# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21# OTHER DEALINGS IN THE SOFTWARE.
22#
23
24PREFIX?= /usr/local
25X11BASE?= /usr/X11R6
26
27PKGLIBS= x11 xft xext xpm
28
29CC?= cc
30CFLAGS+= -O2 -Wall -Wunused \
31 -Wunused -Wmissing-prototypes -Wstrict-prototypes \
32 -Wpointer-sign \
33 `pkg-config --cflags ${PKGLIBS}`
34LDFLAGS+= `pkg-config --libs ${PKGLIBS}`
35
36# use gdk-pixbuf to rescale icons; optional
37PKGLIBS+= gdk-pixbuf-xlib-2.0
38CFLAGS+= -DUSE_GDK_PIXBUF
39
40# enable debugging; optional
41CFLAGS+= -g
42#CFLAGS+= -g -DDEBUG=1
43
44BINDIR= $(PREFIX)/bin
45
46SRC= atom.c \
47 client.c \
48 events.c \
49 keyboard.c \
50 launcher.c \
51 manage.c \
52 parser.c \
53 progman.c \
54 util.c
55
56OBJ= ${SRC:.c=.o}
57
58BIN= progman
59
60all: $(BIN)
61
62$(OBJ): progman.h Makefile
63parser.o: progman.h progman_ini.h
64
65progman_ini.h: progman.ini
66 xxd -i progman.ini > $@ || (rm -f progman_ini.h; exit 1)
67
68progman: $(OBJ)
69 $(CC) -o $@ $(OBJ) $(LDFLAGS)
70
71install: all
72 mkdir -p $(BINDIR) $(MANDIR)
73 install -s $(BIN) $(BINDIR)
74
75clean:
76 rm -f $(BIN) $(OBJ) progman_ini.h
77
78.PHONY: all install clean