-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
69 lines (57 loc) · 2.04 KB
/
Makefile
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
# Makefile for slim - generic Linux
#
# Edit the following section to adjust the options
# to fit into your operating system / distribution
#######################################################
CXX=/usr/bin/g++
CC=/usr/bin/gcc
CFLAGS=-Wall -I. -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/libpng12 -I/usr/include
CXXFLAGS=$(CFLAGS)
LDFLAGS=-lXft -lX11 -lXinerama -lfreetype -lXrender -lfontconfig -lpng12 -lz -lm -lcrypt -lXmu -lpng -ljpeg
CUSTOM=-DHAVE_SHADOW
ifdef USE_PAM
LDFLAGS+= -lpam
CUSTOM+= -DUSE_PAM
endif
PREFIX=/usr
CFGDIR=/etc
MANDIR=/usr/man
DESTDIR=
#######################################################
NAME=slim
VERSION=1.3.1
DEFINES=-DPACKAGE=\"$(NAME)\" -DVERSION=\"$(VERSION)\" \
-DPKGDATADIR=\"$(PREFIX)/share/slim\" -DSYSCONFDIR=\"$(CFGDIR)\"
OBJECTS=jpeg.o png.o main.o image.o numlock.o cfg.o switchuser.o app.o panel.o
ifdef USE_PAM
OBJECTS+=PAM.o
endif
all: slim
slim: $(OBJECTS)
$(CXX) $(LDFLAGS) $(OBJECTS) -o $(NAME)
.cpp.o:
$(CXX) $(CXXFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
.c.o:
$(CC) $(CFLAGS) $(DEFINES) $(CUSTOM) -c $< -o $@
install: slim install-theme
install -D -m 755 slim $(DESTDIR)$(PREFIX)/bin/slim
install -D -m 644 slim.1 $(DESTDIR)$(MANDIR)/man1/slim.1
test -e $(DESTDIR)$(CFGDIR)/slim.conf || \
install -D -m 644 slim.conf $(DESTDIR)$(CFGDIR)/slim.conf
clean:
@rm -f slim *.o
dist:
@rm -rf $(NAME)-$(VERSION)
@mkdir $(NAME)-$(VERSION)
@cp -r *.cpp *.h *.c Makefile Makefile.* COPYING ChangeLog INSTALL README TODO \
xinitrc.sample slim.1 THEMES themes slim.conf $(NAME)-$(VERSION)
@rm -rf $(NAME)-$(VERSION)/themes/.svn $(NAME)-$(VERSION)/themes/default/.svn
@tar cvzf $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
@rm -rf $(NAME)-$(VERSION)
install-theme:
install -D -m 644 themes/default/slim.theme \
$(DESTDIR)$(PREFIX)/share/slim/themes/default/slim.theme
install -D -m 644 themes/default/panel.png \
$(DESTDIR)$(PREFIX)/share/slim/themes/default/panel.png
install -D -m 644 themes/default/background.jpg \
$(DESTDIR)$(PREFIX)/share/slim/themes/default/background.jpg