aboutsummaryrefslogtreecommitdiff
path: root/convert/Makefile
blob: e350747296aba5ba5c876182f16c87d268796b4e (plain)
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
PREFIX = /usr/local

GTKCFLAGS = `pkg-config --cflags gtk+-2.0`
GTKLDFLAGS += `pkg-config --libs gtk+-2.0`
GDKPIXBUFCFLAGS = `pkg-config --cflags gdk-pixbuf-2.0`
GDKPIXBUFLDFLAGS += `pkg-config --libs gdk-pixbuf-2.0`

CPPFLAGS = $(GTKCFLAGS) -D_GNU_SOURCE 
ifeq ($(DEBUG),yes)
CFLAGS += -O2 -g
LDFLAGS = -g #-lefence
else
CFLAGS += -Os -fomit-frame-pointer
endif
CFLAGS += -Wall
CPPFLAGS += -DPACKAGE=\"$(PACKAGE)\" -DPREFIX=\"$(PREFIX)\" -DPACKAGE_LOCALE_DIR=\"$(PREFIX)/share/locale\"
CFLAGS += -MD

MEMBERS = gdk-pixbuf-convert
LIB_MEMBERS =

OBJS = $(patsubst %,%.o,$(MEMBERS))
SOURCES = $(patsubst %,%.c,$(MEMBERS) $(LIB_MEMBERS))
LIB_OBJS = $(patsubst %,%.o,$(LIB_MEMBERS))
LIB_SOURCES = $(patsubst %,%.c,$(LIB_MEMBERS))

DEPS = $(patsubst %,%.d,$(MEMBERS) $(LIB_MEMBERS))


all: gdk-pixbuf-convert

gdk-pixbuf-convert: $(OBJS)
	$(CC) -o $@ $^  $(GDKPIXBUFCFLAGS) $(GDKPIXBUFLDFLAGS) $(LDFLAGS) -L.

clean:
	rm -f $(MEMBERS) $(OBJS) $(DEPS)

install: all 
	mkdir -p $(PREFIX)/bin
	install -s $(MEMBERS) $(PREFIX)/bin/

uninstall:
	$(RM) $(PREFIX)/bin/$(MEMBERS)