git: initial import (.gitignore)
[evilwm.git] / Makefile
blobbadfaa87dcc815b414ad70ea5a683ca490df5964
1 ############################################################################
2 # Installation paths
4 prefix = /usr
5 bindir = $(prefix)/bin
6 datarootdir = $(prefix)/share
7 mandir = $(datarootdir)/man
8 man1dir = $(mandir)/man1
9 desktopfilesdir = $(datarootdir)/applications
11 ############################################################################
12 # Features
14 # Uncomment to enable info banner on holding Ctrl+Alt+I.
15 OPT_CPPFLAGS += -DINFOBANNER
17 # Uncomment to show the same banner on moves and resizes. Can be SLOW!
18 #OPT_CPPFLAGS += -DINFOBANNER_MOVERESIZE
20 # Uncomment for mouse support. Recommended.
21 OPT_CPPFLAGS += -DMOUSE
23 # Uncomment to support the Xrandr extension (thanks, Yura Semashko).
24 OPT_CPPFLAGS += -DRANDR
25 OPT_LDLIBS += -lXrandr
27 # Uncomment to support shaped windows.
28 OPT_CPPFLAGS += -DSHAPE
29 OPT_LDLIBS += -lXext
31 # Uncomment to enable solid window drags. This can be slow on old systems.
32 OPT_CPPFLAGS += -DSOLIDDRAG
34 # Uncomment to compile in certain text messages like help. Recommended.
35 OPT_CPPFLAGS += -DSTDIO
37 # Uncomment to support virtual desktops.
38 OPT_CPPFLAGS += -DVWM
40 # Uncomment to move pointer around on certain actions.
41 OPT_CPPFLAGS += -DWARP_POINTER
43 # Uncomment to use Ctrl+Alt+q instead of Ctrl+Alt+Escape. Useful for Cygwin.
44 #OPT_CPPFLAGS += -DKEY_KILL=XK_q
46 # Uncomment to include whatever debugging messages I've left in this release.
47 #OPT_CPPFLAGS += -DDEBUG # miscellaneous debugging
48 #OPT_CPPFLAGS += -DXDEBUG # show some X calls
50 ############################################################################
51 # Include file and library paths
53 # Most Linux distributions don't separate out X11 from the rest of the
54 # system, but some other OSs still require extra information:
56 # Solaris 10:
57 #OPT_CPPFLAGS += -I/usr/X11/include
58 #LDFLAGS += -R/usr/X11/lib -L/usr/X11/lib
60 # Solaris <= 9 doesn't support RANDR feature above, so disable it there
62 ############################################################################
63 # Build tools
65 # Change this if you don't use gcc:
66 CC = gcc
68 # Override if desired:
69 CFLAGS = -Os
70 WARN = -Wall -W -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wcast-qual \
71 -Wshadow -Waggregate-return -Wnested-externs -Winline -Wwrite-strings \
72 -Wundef -Wsign-compare -Wmissing-prototypes -Wredundant-decls
74 # For Cygwin:
75 #EXEEXT = .exe
77 # Override INSTALL_STRIP if you don't want a stripped binary
78 INSTALL = install
79 INSTALL_STRIP = -s
80 INSTALL_DIR = $(INSTALL) -d -m 0755
81 INSTALL_FILE = $(INSTALL) -m 0644
82 INSTALL_PROGRAM = $(INSTALL) -m 0755 $(INSTALL_STRIP)
84 ############################################################################
85 # You shouldn't need to change anything beyond this point
87 version = 1.1.0
88 distname = evilwm-$(version)
90 # Generally shouldn't be overridden:
91 EVILWM_CPPFLAGS = $(CPPFLAGS) $(OPT_CPPFLAGS) -DVERSION=\"$(version)\"
92 EVILWM_CFLAGS = $(CFLAGS) $(WARN)
93 EVILWM_LDLIBS = -lX11 $(OPT_LDLIBS) $(LDLIBS)
95 HEADERS = evilwm.h keymap.h list.h log.h xconfig.h
96 OBJS = client.o events.o ewmh.o list.o main.o misc.o new.o screen.o xconfig.o
98 .PHONY: all
99 all: evilwm$(EXEEXT)
101 $(OBJS): $(HEADERS)
103 %.o: %.c
104 $(CC) $(EVILWM_CFLAGS) $(EVILWM_CPPFLAGS) -c $<
106 evilwm$(EXEEXT): $(OBJS)
107 $(CC) -o $@ $(OBJS) $(LDFLAGS) $(EVILWM_LDLIBS)
109 .PHONY: install
110 install: evilwm$(EXEEXT)
111 $(INSTALL_DIR) $(DESTDIR)$(bindir)
112 $(INSTALL_PROGRAM) evilwm$(EXEEXT) $(DESTDIR)$(bindir)/
113 $(INSTALL_DIR) $(DESTDIR)$(man1dir)
114 $(INSTALL_FILE) evilwm.1 $(DESTDIR)$(man1dir)/
115 $(INSTALL_DIR) $(DESTDIR)$(desktopfilesdir)
116 $(INSTALL_FILE) evilwm.desktop $(DESTDIR)$(desktopfilesdir)/
118 .PHONY: uninstall
119 uninstall:
120 rm -f $(DESTDIR)$(bindir)/evilwm$(EXEEXT)
121 rm -f $(DESTDIR)$(man1dir)/evilwm.1
122 rm -f $(DESTDIR)$(desktopfilesdir)/evilwm.desktop
124 .PHONY: dist
125 dist:
126 darcs dist --dist-name $(distname)
127 mv $(distname).tar.gz ..
129 .PHONY: debuild
130 debuild: dist
131 -cd ..; rm -rf $(distname)/ $(distname).orig/
132 cd ..; mv $(distname).tar.gz evilwm_$(version).orig.tar.gz
133 cd ..; tar xfz evilwm_$(version).orig.tar.gz
134 cp -a debian ../$(distname)/
135 rm -rf ../$(distname)/debian/_darcs/
136 cd ../$(distname); debuild
138 .PHONY: clean
139 clean:
140 rm -f evilwm$(EXEEXT) $(OBJS)