File: Makefile

package info (click to toggle)
sapphire 0.15.8-9.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 448 kB
  • ctags: 850
  • sloc: cpp: 6,490; makefile: 102; sh: 77
file content (77 lines) | stat: -rw-r--r-- 1,745 bytes parent folder | download | duplicates (2)
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
77
# Sapphire Makefile
#
# frankhale@yahoo.com
# 27 Oct 2001

CC       = g++
CFLAGS   = -g -O2 -Wall

prefix   = /usr
XROOT    = $(prefix)/X11R6
DESTDIR  =
INCLUDES = -I$(XROOT)/include
LDPATH   = -L$(XROOT)/lib
LIBS     = -lXext -lX11

# If you change this, remember to change it in windowmanager.cc (line 34),
# and in data/menu/default (lines 43-47, the themes section). Sapphire no
# longer segfaults if it can't find its menus or themes, but it will always
# give you the defaults, and won't warn you that this has happened.
CONFIGURATION_PATH=/usr/share/sapphire

# DEBUG = Outputs debug information
DEFINES  = #-DDEBUG 
HEADERS  = linkedlist.hh 	\
	   basemenu.hh   	\
	   rootmenu.hh		\
	   iconmenu.hh		\
	   menulex.hh		\
	   scanner.hh		\
	   theme.hh		\
	   toolbar.hh		\
	   image.hh		\
	   windowmanager.hh 	\
	   client.hh		\
	   sapphire.hh   

OBJS     = linkedlist.o 	\
	   basemenu.o   	\
	   rootmenu.o		\
	   iconmenu.o		\
	   menulex.o		\
	   scanner.o		\
	   theme.o		\
	   toolbar.o		\
	   image.o		\
	   windowmanager.o 	\
	   client.o 		\
	   misc.o 		\
	   main.o 

all: sapphire

sapphire: $(OBJS)
	$(CC) $(OBJS) $(LDPATH) $(LIBS) -o $@

$(OBJS): %.o: %.cc $(HEADERS)
	$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -c $< -o $@

install: all
	install sapphire $(DESTDIR)$(prefix)/bin/
	
	install -d $(DESTDIR)$(CONFIGURATION_PATH)/
	
	install -d $(DESTDIR)$(CONFIGURATION_PATH)/themes/
	install -m 644 data/themes/* $(DESTDIR)$(CONFIGURATION_PATH)/themes/
	
	install -d $(DESTDIR)$(CONFIGURATION_PATH)/menu/
	install -m 644 data/menu/* $(DESTDIR)$(CONFIGURATION_PATH)/menu/

uninstall:
	rm $(DESTDIR)$(prefix)/bin/sapphire
	rm -rf $(DESTDIR)$(CONFIGURATION_PATH)
	
clean:
	rm -f sapphire $(OBJS) core

.PHONY: all install clean