ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/truck/Common/common.mk
Revision: 45
Committed: 2008-03-06T18:12:54-08:00 (14 years, 5 months ago) by douglas
File size: 1735 byte(s)
Log Message:
Beginnings of an sqlite3 api ala Menes' dbi.

File Contents

# Content
1 # Truck Computer Dooom!
2 #
3 # Douglas Thrift
4 #
5 # $Id$
6
7 SHELL :=/usr/local/bin/bash -O extglob -O xpg_echo
8 CPPFLAGS := -MD -I$(common) $(shell pcre-config --cflags)
9 CXXFLAGS := -Wall -g -O2 $(shell $(common)/cpu.sh)
10 LDFLAGS := -L$(common)
11 LDLIBS := $(shell pcre-config --libs) -lsqlite3 -ltruck
12
13 reset :=\e[0m
14 bright :=\e[1m
15 dim :=\e[2m
16 underscore :=\e[4m
17 blink :=\e[5m
18 reverse :=\e[7m
19 hidden :=\e[8m
20 black :=\e[30m
21 red :=\e[31m
22 green :=\e[32m
23 yellow :=\e[33m
24 blue :=\e[34m
25 magenta :=\e[35m
26 cyan :=\e[36m
27 white :=\e[37m
28 black_ :=\e[40m
29 red_ :=\e[41m
30 green_ :=\e[42m
31 yellow_ :=\e[43m
32 blue_ :=\e[44m
33 magenta_ :=\e[45m
34 cyan_ :=\e[46m
35 white_ :=\e[47m
36
37 %.o: %.cpp
38 @echo "$(bright)$(white)compile\t$(blue)[$(reset)$(<F)$(bright)$(blue)]$(reset)"
39 @$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
40 @echo "$(bright)$(white)compile\t$(green)[$(reset)$(@F)$(bright)$(green)]$(reset)"
41
42 %: %.o
43 @echo "$(bright)$(white)link\t$(blue)[$(reset)$(^F)$(bright)$(blue)]$(reset)"
44 @$(CXX) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS)
45 @echo "$(bright)$(white)link\t$(green)[$(reset)$(@F)$(bright)$(green)]$(reset)"
46
47 lib%.a: %.o
48 @echo "$(bright)$(white)archive\t$(blue)[$(reset)$(^F)$(bright)$(blue)]$(reset)"
49 @$(AR) cr $@ $^
50 @echo "$(bright)$(white)archive\t$(green)[$(reset)$(@F)$(bright)$(green)]$(reset)"
51
52 define recurse
53 @echo "$(bright)$(white)enter\t$(blue)[$(reset)$(1)$(bright)$(blue)]$(reset)"
54 @+$(MAKE) --no-print-directory -C $(1) $(2)
55 @echo "$(bright)$(white)leave\t$(green)[$(reset)$(1)$(bright)$(green)]$(reset)"
56 endef
57
58 define clean
59 clean:
60 @echo "$(bright)$(white)clean\t$(blue)[$(reset)$(1)$(bright)$(blue)]$(reset)"
61 @rm -frv $(1)
62 @echo "$(bright)$(white)clean\t$(green)[$(reset)$(1)$(bright)$(green)]$(reset)"
63 endef

Properties

Name Value
svn:keywords Id