sdl: bump to the latest
[openpandora.oe.git] / recipes / slim / slim / Makefile.oe
1 # Makefile for slim - OpenEmbedded
2 #######################################################
3
4
5 LDFLAGS=-lXft -lX11 -lfreetype -lXrender -lfontconfig -lpng12 -lz -lm -lcrypt -lXmu -lpng -ljpeg -lrt
6 CUSTOM=-DHAVE_SHADOW
7
8 USE_PAM=1
9 ifdef USE_PAM
10 LDFLAGS+= -lpam
11 CUSTOM+= -DUSE_PAM
12 endif
13
14 #######################################################
15
16 NAME=slim
17 VERSION=1.3.1
18
19 DEFINES=-DPACKAGE=\"$(NAME)\" -DVERSION=\"$(VERSION)\" \
20                 -DPKGDATADIR=\"$(PREFIX)/share/slim\" -DSYSCONFDIR=\"$(CFGDIR)\"
21
22 OBJECTS=jpeg.o png.o main.o image.o numlock.o cfg.o switchuser.o app.o \
23         panel.o util.o
24 ifdef USE_PAM
25 OBJECTS+=PAM.o
26 endif
27
28 all: slim
29
30 slim: $(OBJECTS)
31         $(CXX) $(LDFLAGS) $(OBJECTS) -o $(NAME)
32
33 .cpp.o:
34         $(CXX) $(CXXFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
35
36 .c.o:
37         $(CC) $(CFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
38
39 install: slim install-theme
40         install -D -m 755 slim $(DESTDIR)$(PREFIX)/bin/slim
41         install -D -m 644 slim.1 $(DESTDIR)$(MANDIR)/man1/slim.1
42         test -e $(DESTDIR)$(CFGDIR)/slim.conf || \
43                 install -D -m 644 slim.conf $(DESTDIR)$(CFGDIR)/slim.conf
44
45 clean:
46         @rm -f slim *.o
47
48 dist:
49         @rm -rf $(NAME)-$(VERSION)
50         @mkdir $(NAME)-$(VERSION)
51         @cp -r *.cpp *.h *.c Makefile Makefile.* COPYING ChangeLog INSTALL README TODO \
52                 xinitrc.sample slim.1 THEMES themes slim.conf $(NAME)-$(VERSION)
53         @rm -rf $(NAME)-$(VERSION)/themes/.svn  $(NAME)-$(VERSION)/themes/default/.svn
54         @tar cvzf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
55         @rm -rf $(NAME)-$(VERSION)
56
57
58 install-theme:
59         install -D -m 644 themes/default/slim.theme \
60                  $(DESTDIR)$(PREFIX)/share/slim/themes/default/slim.theme
61         install -D -m 644 themes/default/panel.png \
62                  $(DESTDIR)$(PREFIX)/share/slim/themes/default/panel.png
63         install -D -m 644 themes/default/background.jpg \
64                  $(DESTDIR)$(PREFIX)/share/slim/themes/default/background.jpg