File: Makefile.gcc

package info (click to toggle)
gle-graphics 4.2.4c-6
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 12,156 kB
  • ctags: 11,510
  • sloc: cpp: 76,204; sh: 3,151; makefile: 590; perl: 486; lisp: 142; ansic: 8; xml: 7
file content (163 lines) | stat: -rw-r--r-- 7,122 bytes parent folder | download | duplicates (5)
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
########################################################################
#                                                                      #
# GLE - Graphics Layout Engine <http://www.gle-graphics.org/>          #
#                                                                      #
# Modified BSD License                                                 #
#                                                                      #
# Copyright (C) 2009 GLE.                                              #
#                                                                      #
# Redistribution and use in source and binary forms, with or without   #
# modification, are permitted provided that the following conditions   #
# are met:                                                             #
#                                                                      #
#    1. Redistributions of source code must retain the above copyright #
# notice, this list of conditions and the following disclaimer.        #
#                                                                      #
#    2. Redistributions in binary form must reproduce the above        #
# copyright notice, this list of conditions and the following          #
# disclaimer in the documentation and/or other materials provided with #
# the distribution.                                                    #
#                                                                      #
#    3. The name of the author may not be used to endorse or promote   #
# products derived from this software without specific prior written   #
# permission.                                                          #
#                                                                      #
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR   #
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED       #
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE   #
# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY       #
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL   #
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE    #
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS        #
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER #
# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR      #
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN  #
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.                        #
#                                                                      #
########################################################################

#
# global makefile for gle
# for gcc
#
include config.i
include config.gcc

ZIP_SRC_NAME = $(BASE_NAME)-$(VERSION_NUMBER).$(BUILD_NUMBER)$(GLE_SNAPSHOT)-src.zip
TAR_SRC_NAME = gle-graphics-$(VERSION_NUMBER).$(BUILD_NUMBER)$(GLE_SNAPSHOT)-src.tar.gz
TAR_SRCF_NAME = gle-graphics-$(VERSION_NUMBER).$(BUILD_NUMBER)f$(GLE_SNAPSHOT)-src.tar.gz
TAR_BASE_DIR = gle-graphics-$(VERSION_NUMBER).$(BUILD_NUMBER)

FILTER_CVS  := grep -P -v "(\.svn|CVS|\.cvsignore)"
FILTER_SRC  := $(FILTER_CVS) | grep -P -v "\.($(OBJ_SUFF)|e*ps)$$" | grep -v "moc_"
FILTER_FNTS := $(FILTER_CVS) | grep -P -v "\.(fve|fmt)$$"

all:
	-mkdir -p build
	-mkdir -p build/bin
	-mkdir -p build/lib
	-mkdir -p build/gleinc
	$(MAKE) -C src/gle/bitmap -f Makefile.gcc
	$(MAKE) -C src/gle/surface -f Makefile.gcc
	$(MAKE) -C src/gle/letzfitz -f Makefile.gcc
	$(MAKE) -C src/gle/tokens -f Makefile.gcc
	$(MAKE) -C src/gle -f Makefile.gcc
	$(MAKE) -C src/fbuild -f Makefile.gcc
	$(MAKE) -C src/makefmt -f Makefile.gcc
	$(MAKE) -C src/fonts -f Makefile.gcc
	$(MAKE) -C src/lib -f Makefile.gcc
	$(MAKE) -C src/TeX -f Makefile.gcc
	@echo ""
	@echo "**********************************************************"
	@echo "Type \"make install\" to install GLE $(VERSION_NUMBER).$(BUILD_NUMBER)"
	@echo "Install data into: $(INSTALL_DIR)"
	@echo "Install binary into: $(INSTALL_BIN)"
	@echo "**********************************************************"
	@echo ""

clean:
	$(MAKE) -C src/gle/bitmap -f Makefile.gcc clean
	$(MAKE) -C src/gle/surface -f Makefile.gcc clean
	$(MAKE) -C src/gle/letzfitz -f Makefile.gcc clean
	$(MAKE) -C src/gle/tokens -f Makefile.gcc clean
	$(MAKE) -C src/gle -f Makefile.gcc clean
	$(MAKE) -C src/fbuild -f Makefile.gcc clean
	$(MAKE) -C src/makefmt -f Makefile.gcc clean
	$(MAKE) -C src/fonts -f Makefile.gcc clean
	$(MAKE) -C src/TeX -f Makefile.gcc clean
	$(MAKE) -C src/manip -f Makefile.gcc clean
	-$(RMDIR) build

manip:
	$(MAKE) -C src/manip -f Makefile.gcc

install: clean_install
	-mkdir -p $(INSTALL_DIR)
	-mkdir -p $(INSTALL_BIN)
	-cp -r build/* $(INSTALL_DIR)
	-strip $(INSTALL_DIR)/bin/gle*
	-strip $(INSTALL_DIR)/bin/fbuild*
	-strip $(INSTALL_DIR)/bin/makefmt*
	-strip $(INSTALL_DIR)/bin/manip*
	-echo "#!/bin/sh" > $(INSTALL_BIN)/gle
	-echo "export GLE_TOP=$(INSTALL_DIR)" >> $(INSTALL_BIN)/gle
	-echo "$(INSTALL_DIR)/bin/gle \$$@" >> $(INSTALL_BIN)/gle
	-chmod 755 $(INSTALL_BIN)/gle
	-echo "#!/bin/sh" > $(INSTALL_BIN)/manip
	-echo "export GLE_TOP=$(INSTALL_DIR)" >> $(INSTALL_BIN)/manip
	-echo "$(INSTALL_DIR)/bin/manip \$$@" >> $(INSTALL_BIN)/manip
	-chmod 755 $(INSTALL_BIN)/manip
	@echo ""
	@echo "****************************************************************"
	@echo "GLE $(VERSION_NUMBER).$(BUILD_NUMBER) has been installed"
	@echo "You can use GLE now by entering the command \"gle\""
	@echo "(Provided that $(INSTALL_BIN) is in your PATH.)"
	@echo "****************************************************************"
	@echo ""

linklib:
	rm -rf $(INSTALL_DIR)/gleinc
	ln -s `pwd`/src/lib $(INSTALL_DIR)/gleinc

clean_install:
	-$(RM) $(INSTALL_BIN)/gle
	-$(RM) $(INSTALL_DIR)/bin/*
	-$(RMDIR) $(INSTALL_DIR)/bin
	-$(RM) $(INSTALL_DIR)/font/*
	-$(RMDIR) $(INSTALL_DIR)/font
	-$(RM) $(INSTALL_DIR)/*.ini

full: clean all

coll:
	perl platform/script/collectsrcfiles.pl platform/script/srcfiles.csv

zipsrc:
	perl platform/script/correctfilemodes.pl
	-rm -f $(ZIP_SRC_NAME)
	perl platform/script/collectsrcfiles.pl platform/script/srcfiles.csv > srcfiles.txt
	(cd ..; cat gle4/srcfiles.txt | sed -e s/^/gle4\\// | xargs zip gle4/$(ZIP_SRC_NAME))
	-@echo "$(ZIP_SRC_NAME) has been created!"

tarsrc:
	perl platform/script/correctfilemodes.pl
	-rm -f $(TAR_SRC_NAME)
	perl platform/script/collectsrcfiles.pl platform/script/srcfiles.csv > srcfiles.txt
	tar czfv $(TAR_SRC_NAME) --files-from srcfiles.txt --transform 's|^|$(TAR_BASE_DIR)/|' --group 0 --owner 0
	-@echo "$(TAR_SRC_NAME) has been created!"

tarsrcf:
	perl platform/script/correctfilemodes.pl
	-rm -f $(TAR_SRCF_NAME)
	-touch src/fonts/extrafonts.inf
	perl platform/script/collectsrcfiles.pl -all platform/script/srcfiles.csv > srcfiles.txt
	tar czfv $(TAR_SRCF_NAME) --files-from srcfiles.txt --transform 's|^|$(TAR_BASE_DIR)/|' --group 0 --owner 0
	-@rm src/fonts/extrafonts.inf
	-@echo "$(TAR_SRCF_NAME) has been created!"

commit:
	cvs commit -m "commit via nmake working on version $(TAG)"

tagall:
	cvs rtag $(TAG) $(MODULE_NAME) $(DEPENDANT_MODULES)