File: Makefile

package info (click to toggle)
wmdrawer 0.10.5-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 396 kB
  • sloc: ansic: 1,841; makefile: 53
file content (76 lines) | stat: -rw-r--r-- 1,404 bytes parent folder | download
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
SHELL = /bin/sh
CC = gcc
PKG_CONFIG ?= pkg-config

# Operating system
OS = -DLINUX
#OS = -DSOLARIS
#OS = -DFREEBSD

INSTALL = /usr/bin/install
RM = rm -f

DESTDIR =

PREFIX = $(DESTDIR)/usr
MANDIR = $(PREFIX)/man/man1
DOCDIR = $(PREFIX)/share/doc

# Image library
#USE_GDKPIXBUF = 1
USE_GDKPIXBUF2 = 1
#USE_IMLIB = 1

DEFS = $(OS)

ifdef USE_GDKPIXBUF
IMGLIB_DEF = -DUSE_GDKPIXBUF
CFLAGS = -O3 -Wall `gdk-pixbuf-config --cflags`
LDFLAGS = `gdk-pixbuf-config --libs` -lgdk_pixbuf_xlib
endif

ifdef USE_GDKPIXBUF2
IMGLIB_DEF = -DUSE_GDKPIXBUF2
CFLAGS += -O3 -Wall `$(PKG_CONFIG) --cflags gdk-pixbuf-xlib-2.0` -I/usr/X11R6/include
LDFLAGS += `$(PKG_CONFIG) --libs gdk-pixbuf-xlib-2.0` -rdynamic -lX11 -lXi -lXext -L/usr/X11R6/lib
endif

ifdef USE_IMLIB
IMGLIB_DEF = -DUSE_IMLIB
CFLAGS = -O3 -Wall `imlib-config --cflags`
LDFLAGS = `imlib-config --libs`
endif

DEFS += $(IMGLIB_DEF)

ifeq ($(OS),-DSOLARIS)
	LDFLAGS += -lposix4 -lz -ltiff -ljpeg
	DEFS += -DUSE_GETOPT
endif

ifeq ($(OS),-DFREEBSD)
	LDFLAGS += -lgnugetopt
endif

PRGS = wmdrawer
SRCS = utils.c config.c graphics.c images.c wmdrawer.c
OBJS = $(SRCS:.c=.o)

all : $(PRGS)

.c.o :
	$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFS) -c $<

wmdrawer : $(OBJS)
	$(CC) $(OBJS) $(LDFLAGS) -o $@

clean :
	$(RM) *.o $(PRGS)

install : wmdrawer
	$(INSTALL) -m 755 wmdrawer $(PREFIX)/bin


uninstall: clean
	$(RM) $(PREFIX)/bin/wmdrawer
	$(RM) -rf $(DOCDIR)/wmdrawer