-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
69 lines (55 loc) · 1.58 KB
/
Makefile.in
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
SHELL = /bin/sh
CFLAGS = -g -Wall -std=c99 @PKGS_CFLAGS@ -DWANT_MAXWIDTH \
-DWANT_CTLSOCKET @SYSTEM_CFLAGS@
LDFLAGS = @PKGS_LDFLAGS@ @SYSTEM_LDFLAGS@
prefix = @prefix@
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
datarootdir = $(prefix)/share
mandir = $(datarootdir)/man
INSTALL ?= install
INSTALLFLAGS ?=
SRCS=mxswm.c stack.c client.c event.c menu.c keyboard.c ctlsocket.c ctl.c \
icccm.c color.c font.c prompt.c statusbar.c history.c
PROG=mxswm
OBJS=$(SRCS:.c=.o)
all: fontnames.c fontnames.h colornames.c colornames.h $(PROG) mxswmctl
fontnames.c: mkenum font.enums
@./mkenum impl font <font.enums >$@
@echo $@
fontnames.h: mkenum font.enums
@./mkenum header font <font.enums >$@
@echo $@
colornames.c: mkenum color.enums
@./mkenum impl color <color.enums >$@
@echo $@
colornames.h: mkenum color.enums
@./mkenum header color <color.enums >$@
@echo $@
mxswmctl:
make -C mxswmctl
$(PROG): $(OBJS)
@$(CC) -o$@ $(OBJS) $(LDFLAGS)
@echo $@
.c.o:
@$(CC) $(CFLAGS) -c $<
@echo $@
clean:
rm -f $(OBJS) $(PROG)
make -C mxswmctl clean
install: $(PROG)
if [ ! -x $(DESTDIR)$(bindir) ] ; then \
mkdir -p $(DESTDIR)$(bindir) ; fi
if [ ! -x $(DESTDIR)$(mandir)/man1 ] ; then \
mkdir -p $(DESTDIR)$(mandir)/man1 ; fi
$(INSTALL) $(INSTALLFLAGS) $(PROG) $(DESTDIR)$(bindir)
$(INSTALL) $(INSTALLFLAGS) -m 444 mxswm.1 \
$(DESTDIR)$(mandir)/man1/mxswm.1
make -C mxswmctl install
uninstall:
if [ -e $(DESTDIR)$(bindir)/$(PROG) ] ; then \
rm $(DESTDIR)$(bindir)/$(PROG) ; fi
rm -f $(DESTDIR)$(mandir)/man1/mxswm.1
make -C mxswmctl uninstall
.PHONY: mxswmctl