File: Makefile

package info (click to toggle)
trend 1.2-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 220 kB
  • ctags: 283
  • sloc: cpp: 1,891; perl: 110; makefile: 50; sh: 12
file content (68 lines) | stat: -rw-r--r-- 1,452 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
## Makefile for trend
## Copyright(c) 2003-2009 by wave++ "Yuri D'Elia" <wavexx@users.sf.net>
## Distributed under GNU LGPL WITHOUT ANY WARRANTY.

#if $(CXX) == "CC"
# pmake (assume Mipspro)
TREND_CXXFLAGS :=
TREND_CPPFLAGS := -I/usr/freeware/include -I/usr/local/include
TREND_LDFLAGS := -FE:template_in_elf_section -quiet_prelink
TREND_LDADD := -lpthread -L/usr/freeware/lib32 -L/usr/local/lib32 -lm -lglut -lGL -lGLU -lX11 -lXmu
#else
ifeq ($(shell uname), Darwin)
# OS X (_nice_ framework system, I admit)
TREND_CXXFLAGS := -pthread
TREND_CPPFLAGS :=
TREND_LDFLAGS :=
TREND_LDADD := -framework GLUT -framework OpenGL
else
# classic posix
TREND_CXXFLAGS := -pthread
TREND_CPPFLAGS := -MD
TREND_LDFLAGS :=
TREND_LDADD := -lglut -lGL -lGLU
endif
#endif

CXXFLAGS += $(TREND_CXXFLAGS)
CPPFLAGS += $(TREND_CPPFLAGS)
LDFLAGS += $(TREND_LDFLAGS)
LDADD += $(TREND_LDADD)


# Config
TREND_BUILT = version.h
TREND_OBJECTS = trend.o color.o
TARGETS = trend


# Rules
.SUFFIXES: .cc .o
.PHONY: all dist clean distclean

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


# Targets
all: $(TARGETS)

dist: $(TREND_BUILT)

trend: $(TREND_OBJECTS)
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $(TREND_OBJECTS) $(LDADD)

# just update upon tagging
version.h:
	echo -n `git describe` | cencode -q 'static const' -s TREND_VERSION > $@

distclean: clean
	rm -rf $(TREND_BUILT)

clean:
	rm -rf *.[do] core ii_files $(TARGETS)


# Dependencies
trend.o: version.h
sinclude *.d