| 1 | # If you don't use CC |
|---|
| 2 | CC = gcc |
|---|
| 3 | |
|---|
| 4 | # Edit this line if you don't want evilwm to install under /usr. |
|---|
| 5 | # Note that $(DESTDIR) is used by the Debian build process. |
|---|
| 6 | prefix = $(DESTDIR)/usr |
|---|
| 7 | |
|---|
| 8 | XROOT = /usr/X11R6 |
|---|
| 9 | INCLUDES = -I$(XROOT)/include |
|---|
| 10 | LDPATH = -L$(XROOT)/lib |
|---|
| 11 | LIBS = -lX11 |
|---|
| 12 | |
|---|
| 13 | DEFINES = $(EXTRA_DEFINES) |
|---|
| 14 | # Configure evilwm by editing the following DEFINES lines. You can also |
|---|
| 15 | # add options by setting EXTRA_DEFINES on the make(1) command line, |
|---|
| 16 | # e.g., make EXTRA_DEFINES="-DDEBUG". |
|---|
| 17 | |
|---|
| 18 | # Uncomment to enable solid window drags. This can be slow on old systems. |
|---|
| 19 | DEFINES += -DSOLIDDRAG |
|---|
| 20 | # Enable a more informative and clear banner to be displayed on Ctrl+Alt+I. |
|---|
| 21 | DEFINES += -DINFOBANNER |
|---|
| 22 | # Uncomment to show the same banner on moves and resizes. Note this can |
|---|
| 23 | # make things very SLOW! |
|---|
| 24 | #DEFINES += -DINFOBANNER_MOVERESIZE |
|---|
| 25 | |
|---|
| 26 | # To support virtual desktops, uncomment the following line. |
|---|
| 27 | DEFINES += -DVWM |
|---|
| 28 | |
|---|
| 29 | # To support shaped windows properly, uncomment the following two lines: |
|---|
| 30 | DEFINES += -DSHAPE |
|---|
| 31 | LIBS += -lXext |
|---|
| 32 | |
|---|
| 33 | # Uncomment for mouse support. You probably want this. |
|---|
| 34 | DEFINES += -DMOUSE |
|---|
| 35 | |
|---|
| 36 | # Uncomment for snap-to-border support (thanks, Neil Drumm) |
|---|
| 37 | # Start evilwm with -snap num to enable (num is proximity in pixels to snap to) |
|---|
| 38 | DEFINES += -DSNAP |
|---|
| 39 | |
|---|
| 40 | # Uncomment to compile in certain text messages like help. You want this too |
|---|
| 41 | # unless you *really* want to trim the bytes. |
|---|
| 42 | # Note that snprintf(3) is always part of the build. |
|---|
| 43 | DEFINES += -DSTDIO |
|---|
| 44 | |
|---|
| 45 | # You can save a few bytes if you know you won't need colour map support |
|---|
| 46 | # (e.g., for 16 or more bit displays) |
|---|
| 47 | DEFINES += -DCOLOURMAP |
|---|
| 48 | |
|---|
| 49 | # Uncomment the following line if you want to use Ctrl+Alt+q to kill windows |
|---|
| 50 | # instead of Ctrl+Alt+Escape (or just set it to what you want). This is |
|---|
| 51 | # useful under XFree86/Cygwin and VMware (probably) |
|---|
| 52 | #DEFINES += -DKEY_KILL=XK_q |
|---|
| 53 | |
|---|
| 54 | # Print whatever debugging messages I've left in this release. |
|---|
| 55 | #DEFINES += -DDEBUG # miscellaneous debugging |
|---|
| 56 | |
|---|
| 57 | # ----- You shouldn't need to change anything under this line ------ # |
|---|
| 58 | |
|---|
| 59 | version = 0.99.25 |
|---|
| 60 | |
|---|
| 61 | distname = evilwm-$(version) |
|---|
| 62 | |
|---|
| 63 | #DEFINES += -DXDEBUG # show some X calls |
|---|
| 64 | |
|---|
| 65 | DEFINES += -DVERSION=\"$(version)\" $(DEBIAN) |
|---|
| 66 | CFLAGS += $(INCLUDES) $(DEFINES) -Os -Wall |
|---|
| 67 | #CFLAGS += $(INCLUDES) $(DEFINES) -g -Wall |
|---|
| 68 | CFLAGS += -W -Wstrict-prototypes -Wpointer-arith -Wcast-align -Wcast-qual -Wshadow -Waggregate-return -Wnested-externs -Winline -Wwrite-strings -Wundef -Wsign-compare -Wmissing-prototypes -Wredundant-decls |
|---|
| 69 | LDFLAGS += $(LDPATH) $(LIBS) |
|---|
| 70 | |
|---|
| 71 | HEADERS = evilwm.h log.h |
|---|
| 72 | SRCS = client.c events.c main.c misc.c new.c screen.c ewmh.c |
|---|
| 73 | OBJS = $(SRCS:.c=.o) |
|---|
| 74 | |
|---|
| 75 | .PHONY: all install dist debuild clean |
|---|
| 76 | |
|---|
| 77 | all: evilwm |
|---|
| 78 | |
|---|
| 79 | evilwm: $(OBJS) |
|---|
| 80 | $(CC) $(CFLAGS) $(OBJS) -o $@ $(LDFLAGS) |
|---|
| 81 | |
|---|
| 82 | %.o: %.c $(HEADERS) |
|---|
| 83 | $(CC) $(CFLAGS) -c $< |
|---|
| 84 | |
|---|
| 85 | install: evilwm |
|---|
| 86 | if [ -f evilwm.exe ]; then mv evilwm.exe evilwm; fi |
|---|
| 87 | mkdir -p $(prefix)/bin $(prefix)/share/man/man1 |
|---|
| 88 | install -s evilwm $(prefix)/bin |
|---|
| 89 | install evilwm.1 $(prefix)/share/man/man1 |
|---|
| 90 | #gzip -9 $(prefix)/share/man/man1/evilwm.1 |
|---|
| 91 | |
|---|
| 92 | dist: |
|---|
| 93 | darcs dist --dist-name $(distname) |
|---|
| 94 | mv $(distname).tar.gz .. |
|---|
| 95 | |
|---|
| 96 | debuild: dist |
|---|
| 97 | -cd ..; rm -rf $(distname)/ $(distname).orig/ |
|---|
| 98 | cd ..; mv $(distname).tar.gz evilwm_$(version).orig.tar.gz |
|---|
| 99 | cd ..; tar xfz evilwm_$(version).orig.tar.gz |
|---|
| 100 | cp -a debian ../$(distname)/ |
|---|
| 101 | rm -rf ../$(distname)/debian/_darcs/ |
|---|
| 102 | cd ../$(distname); debuild |
|---|
| 103 | |
|---|
| 104 | clean: |
|---|
| 105 | rm -f evilwm evilwm.exe $(OBJS) |
|---|