ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/truck/Common/common.mk
Revision: 17
Committed: 2007-06-07T18:56:06-07:00 (15 years, 4 months ago) by douglas
File size: 1250 byte(s)
Log Message:
Optimize!

File Contents

# User Rev Content
1 douglas 2 # Truck Computer Dooom!
2     #
3     # Douglas Thrift
4     #
5     # $Id$
6    
7 douglas 15 SHELL :=/usr/local/bin/bash -O extglob -O xpg_echo
8 douglas 17 CPPFLAGS := -MD -I/usr/local/include
9     CXXFLAGS := -Wall -pedantic -g -O2 $(shell $(common)/cpu.sh)
10 douglas 2
11 douglas 15 reset :=\e[0m
12     bright :=\e[1m
13     dim :=\e[2m
14     underscore :=\e[4m
15     blink :=\e[5m
16     reverse :=\e[7m
17     hidden :=\e[8m
18     black :=\e[30m
19     red :=\e[31m
20     green :=\e[32m
21     yellow :=\e[33m
22     blue :=\e[34m
23     magenta :=\e[35m
24     cyan :=\e[36m
25     white :=\e[37m
26     black_ :=\e[40m
27     red_ :=\e[41m
28     green_ :=\e[42m
29     yellow_ :=\e[43m
30     blue_ :=\e[44m
31     magenta_ :=\e[45m
32     cyan_ :=\e[46m
33     white_ :=\e[47m
34 douglas 2
35 douglas 7 %.o: %.cpp
36 douglas 16 @echo "$(bright)$(white)compile$(reset)\t$(bright)$(blue)[$(reset)$(<F)$(bright)$(blue)]$(reset)"
37 douglas 7 @$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
38 douglas 16 @echo "$(bright)$(white)compile$(reset)\t$(bright)$(green)[$(reset)$(@F)$(bright)$(green)]$(reset)"
39    
40     %: %.o
41     @echo "$(bright)$(white)link\t$(blue)[$(reset)$(^F)$(bright)$(blue)]$(reset)"
42     @$(CXX) $(LDFLAGS) -o $@ $^ $(LOADLIBES) $(LDLIBS)
43     @echo "$(bright)$(white)link\t$(green)[$(reset)$(@F)$(bright)$(green)]$(reset)"
44    
45     lib%.a: %.o
46     @echo "$(bright)$(white)archive\t$(blue)[$(reset)$(^F)$(bright)$(blue)]$(reset)"
47     @$(AR) cr $@ $^
48     @echo "$(bright)$(white)archive\t$(green)[$(reset)$(@F)$(bright)$(green)]$(reset)"

Properties

Name Value
svn:keywords Id