File: Makefile

package info (click to toggle)
xplanet 0.43-5
  • links: PTS
  • area: main
  • in suites: potato
  • size: 904 kB
  • ctags: 321
  • sloc: cpp: 3,041; sh: 1,977; makefile: 141
file content (129 lines) | stat: -rw-r--r-- 2,953 bytes parent folder | download
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# Generated automatically from Makefile.in by configure.
SHELL = /bin/sh

CP = /bin/cp
GZIP = /bin/gzip
INSTALL = /usr/bin/install -c
RM = /bin/rm
STRIP = /usr/bin/strip
TAR = /bin/tar

prefix = /usr
exec_prefix = ${prefix}
bindir = /usr/X11R6/bin
includedir = ${prefix}/include
libdir = ${exec_prefix}/lib
mandir = /usr/X11R6/man
auxdir = ${prefix}/share/xplanet
version = 0.43
distdir = xplanet-$(version)

CXX = c++
CXXFLAGS += -Wall -O3 -I/usr/X11R6/include  -I/usr/X11R6/include -I$(includedir)

X_LIBS = -L/usr/lib -lImlib -ljpeg -ltiff -lungif -lpng -lz -lm -lXext -L/usr/X11R6/lib -lSM -lICE -lXext -lX11  -L/usr/X11R6/lib  -lSM -lICE  -lX11

OPENGLLIBS = -lglut -lXmu -lXi -lMesaGL -lMesaGLU 

LIBS = $(OPENGLLIBS) $(X_LIBS) 

SRCS = \
	xplanet.cc \
	glutfuncs.cc \
	image.cc \
	location.cc \
	moonpos.cc \
	options.cc \
	ortho.cc \
	planet.cc \
	sunpos.cc \
	text.cc \
	util.cc 

OBJS = $(SRCS:.cc=.o)
AUXDIR = $(notdir $(wildcard auxdir/*.ppm auxdir/*-markers.txt))

.cc.o: 
	$(CXX) -c $(CXXFLAGS) $< 

all: xplanet xplanetbg

xplanet: $(OBJS)
	$(CXX) -o $@ $(OBJS) $(LIBS)

xplanetbg: xplanetbg.o orbit.o
	$(CXX) -o $@ $^ $(X_LIBS)

xplanet.o: xplanet.cc auxfiles.h image.h options.h planet.h text.h util.h

glutfuncs.o: glutfuncs.cc xplanet.h image.h

image.o: image.cc location.h options.h planet.h text.h util.h xplanet.h

location.o: location.cc location.h util.h

moonpos.o: moonpos.cc util.h

options.o: options.cc options.h checkfuncs.h util.h xplanet.h 

ortho.o: ortho.cc location.h options.h util.h

planet.o: planet.cc planet.h util.h

sunpos.o: sunpos.cc util.h

text.o: text.cc image.h location.h options.h planet.h text.h util.h xplanet.h

util.o: util.cc 

xplanetbg.o: xplanetbg.cc checkfuncs.h orbit.h 

orbit.o: orbit.cc orbit.h

install:
	$(INSTALL) -d $(bindir)
	$(INSTALL) xplanet $(bindir)
	$(INSTALL) xplanetbg $(bindir)
	$(INSTALL) -m 755 tkxplanet $(bindir)
	$(INSTALL) -d $(mandir)
	$(INSTALL) -d $(mandir)/man1
	$(INSTALL) -m 644 xplanet.1 $(mandir)/man1
	$(INSTALL) -m 644 xplanetbg.1 $(mandir)/man1
	$(INSTALL) -d $(auxdir)
ifneq ($(AUXDIR),)
	$(INSTALL) -m 644 $(addprefix auxdir/,$(AUXDIR)) $(auxdir)
endif

install-strip: install
	$(STRIP) $(bindir)/xplanet
	$(STRIP) $(bindir)/xplanetbg

uninstall:
	$(RM) $(bindir)/xplanet
	$(RM) $(bindir)/xplanetbg
	$(RM) $(bindir)/tkxplanet
	$(RM) $(mandir)/man1/xplanet.1
	$(RM) $(mandir)/man1/xplanetbg.1
ifneq ($(AUXDIR),)
	$(RM) $(addprefix $(auxdir)/, $(AUXDIR))
endif

dist: 	
	$(INSTALL) -d $(distdir)
	$(CP) BUGS COPYING CREDITS ChangeLog INSTALL Makefile* README *.cc \
	*.h *.h.in tkxplanet* aclocal.m4 configure* *.1 $(distdir)
	$(CP) -r autoconf $(distdir)
ifneq ($(AUXDIR),)
	$(INSTALL) -d $(distdir)/auxdir
	$(CP) -r auxdir/*.txt $(distdir)/auxdir	
endif
	$(TAR) cf $(distdir).tar $(distdir)
	$(GZIP) -9 $(distdir).tar
	$(RM) -fr $(distdir)

clean:
	$(RM) *.o 

distclean:
	$(RM) *.o auxfiles.h checkfuncs.h xplanet xplanetbg config.* \
	tkxplanet Makefile