File: Makefile

package info (click to toggle)
flwm 1.02+git2015.10.03+7dbb30-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 444 kB
  • ctags: 500
  • sloc: cpp: 4,958; makefile: 183; sh: 179; tcl: 56
file content (82 lines) | stat: -rw-r--r-- 1,924 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
78
79
80
81
82
SHELL=/bin/sh

PROGRAM = flwm
VERSION = 1.02

CXXFILES = main.C Frame.C Menu.C FrameWindow.C Desktop.C Hotkeys.C

MANPAGE = 1

################################################################

OBJECTS = $(CXXFILES:.C=.o)

all:	makeinclude $(PROGRAM)

$(PROGRAM) : $(OBJECTS)
	$(CXX) $(LDFLAGS) -o $(PROGRAM) $(OBJECTS) $(LIBS)

configure: configure.in
	autoconf

makeinclude: configure makeinclude.in
	./configure
include makeinclude

.SUFFIXES : .fl .do .C .c .H

.C.o :
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $<
.C :
	$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $<
.fl.C :
	-fluid -c $<
.fl.H :
	-fluid -c $<

clean :
	-@ rm -f *.o $(PROGRAM) $(CLEAN) core *~ makedepend
	@touch makedepend

depend:
	$(MAKEDEPEND) -I.. $(CXXFLAGS) $(CXXFILES) $(CFILES) > makedepend
makedepend:
	touch makedepend
include makedepend

install: $(PROGRAM)
	$(INSTALL) -D $(PROGRAM) $(bindir)/$(PROGRAM)
	$(INSTALL) -D $(PROGRAM).$(MANPAGE) $(mandir)/man$(MANPAGE)/$(PROGRAM).$(MANPAGE)

uninstall:
	-@ rm -f $(bindir)/$(PROGRAM)
	-@ rm -f $(mandir)/man$(MANPAGE)/$(PROGRAM).$(MANPAGE)

dist:
	cat /dev/null > makedepend
	-@mkdir $(PROGRAM)-$(VERSION)
	-@ln README Makefile configure install-sh makedepend *.C *.H *.h *.in *.fl $(PROGRAM).$(MANPAGE) flwm_wmconfig $(PROGRAM)-$(VERSION)
	tar -cvzf $(PROGRAM)-$(VERSION).tgz $(PROGRAM)-$(VERSION)
	-@rm -r $(PROGRAM)-$(VERSION)

exedist:
	-@mkdir $(PROGRAM)-$(VERSION)-x86
	-@ln README $(PROGRAM) $(PROGRAM).$(MANPAGE) flwm_wmconfig $(PROGRAM)-$(VERSION)-x86
	tar -cvzf $(PROGRAM)-$(VERSION)-x86.tgz $(PROGRAM)-$(VERSION)-x86
	-@rm -r $(PROGRAM)-$(VERSION)-x86

################################################################

PROGRAM_D = $(PROGRAM)_d

debug: $(PROGRAM_D)

OBJECTS_D = $(CXXFILES:.C=.do) $(CFILES:.c=.do)

.C.do :
	$(CXX) -I.. $(CXXFLAGS) -DDEBUG -c -o $@ $<
.c.do :
	$(CC) -I.. $(CFLAGS) -DDEBUG -o $@ $<

$(PROGRAM_D) : $(OBJECTS_D)
	$(CXX) $(LDFLAGS) -o $(PROGRAM_D) $(OBJECTS_D) $(LIBS)