-
Notifications
You must be signed in to change notification settings - Fork 13
/
Makefile.in
executable file
·256 lines (211 loc) · 6.87 KB
/
Makefile.in
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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
CC = @CC@
CXX = @CXX@
LEX = @LEX@
RANLIB = @RANLIB@
AR = @AR@
YACC = @YACC@
HAVEPERL = @HAVEPERL@
@SET_MAKE@
VERSION = @VERSION@
ACLOCAL_AMFLAGS = -I m4
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@ -Iinclude/breve -DdDOUBLE @DEFS@
LDFLAGS = -Lbin @LDFLAGS@
EXTRACFLAGS = -g
OPTFLAGS = -O4 @EXTRAOPTFLAGS@
CXXFLAGS = $(EXTRACFLAGS) @CXXFLAGS@ -pipe -Wall
YFLAGS = -d
PLATFORM = @PLATFORM@
LPLATFORM = $(shell echo $(PLATFORM)|tr '[A-Z]' '[a-z]'|tr -d '[0-9].-')
DMG_FILE = breve_@VERSION@.dmg
CLI_FOLDER = breve_@VERSION@
IDE_FOLDER = breveIDE_@VERSION@
LIBS = @LIBS@
prefix = @prefix@
exec_prefix = @exec_prefix@
all: depend lib/libbreve.a bin/osmesaloader.o bin/breve@EXE_SUFFIX@ README.txt README_SOURCE.txt
include simulation/Makefile
include kernel/Makefile
include neural/Makefile
include neural/Network/Makefile
include steve/Makefile
include python/Makefile
# include perl/Makefile
include lisp/Makefile
include scheme/Makefile
include util/Makefile
include WinSaver/Makefile
DEPS := $(SRC) bin/breve.cc
DEPS := $(DEPS:.cc=.d)
DEPS := $(DEPS:.c=.d)
-include $(DEPS)
OBJ := $(SRC:.cc=.o)
OBJ := $(OBJ:.c=.o)
bin/breve@EXE_SUFFIX@: bin/breve.o $(OBJ)
$(CXX) -o $@ $(CFLAGS) $^ $(LDFLAGS) @PLUGINIMP@ $(LIBS)
bin/osmesaloader.o: bin/osmesaloader.cc
-$(CXX) -shared -o $@ $^ $(LDFLAGS) -lOSMesa
breve.dll: $(OBJ)
$(CXX) @PLUGINFLAGS@ -o $@ @PLUGINIMP@ $^ $(LIBS)
%.o: %.c
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
%.o: %.cc
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
%.tab.c: %.y
$(YACC) $(YFLAGS) -o $@ $<
%.d: %.cc
@echo "Generating dependencies for $<"
@/bin/echo -n $(@D)/ > $@
@$(CXX) -MM $(CPPFLAGS) $< >> $@ || rm $@
%.d: %.c
@echo "Generating dependencies for $<"
@/bin/echo -n $(@D)/ > $@
@$(CXX) -MM $(CPPFLAGS) $< >> $@ || rm $@
debug: all
optimize:
$(MAKE) EXTRACFLAGS='$(OPTFLAGS)'
optimize_debug:
$(MAKE) EXTRACFLAGS='-g $(OPTFLAGS)'
lib/libbreve.a: $(OBJ)
-rm $@
$(AR) -cr $@ $(OBJ)
$(RANLIB) $@
.PHONY: clean OSX_build OSX_clean OSX_release CLI_release install
%.txt: %.m4
m4 -D_VERSION_=$(VERSION) -D_DATE_=`date +'%m-%d-%y'` $< > $@
clean:
cd docBuild; make clean
rm -f README.txt README_SOURCE.txt
rm -f bin/breve@EXE_SUFFIX@
rm -f .depend breve.dll lib/*.a
rm -f steve/format.c steve/stevelex.c
rm -f steve/steveparse.tab.c steve/steveparse.tab.h
find . -name 'core' -exec rm -f {} \;
find . -name '*.o' -exec rm -f {} \;
find . -name '*.d' -exec rm -f {} \;
depend:: $(DEPS)
documentation:
cd docBuild; make html
rm -rf docs
mkdir -p docs
cp -r docBuild/htmldocs/* docs
OSX_build: optimize lib/libbreve.a
m4 -D_VERSION_=$(VERSION) -D_DATE_=`date +'%m-%d-%y'` OSX/README.html.m4 > OSX/README.html
-mkdir docs
cd plugins; $(MAKE)
cd OSX; xcodebuild -configuration Deployment-Universal CC= LIBS='@LDFLAGS@ $(LIBS)' BREVE_VERSION=$(VERSION)
OSX_debug: optimize_debug lib/libbreve.a
-mkdir docs
cd plugins; $(MAKE)
cd OSX; xcodebuild -configuration Deployment-Universal CC= LIBS='@LDFLAGS@ $(LIBS)' BREVE_VERSION=$(VERSION)
OSX_clean: clean
rm -f $(DMG_FILE)
cd plugins; $(MAKE) clean
cd OSX; xcodebuild clean
rm -rf OSX/build plugins/*/build
release: clean OSX_clean
make CLI_release
ifeq ($(PLATFORM),darwin)
make OSX_release
else
make WX_release
endif
OSX_release:
$(MAKE) -j1 documentation
$(MAKE) OSX_build
rm -f $(DMG_FILE)
rm -rf breve_image_folder
mkdir breve_image_folder
cp -R OSX/build/Deployment-Universal/breve.app breve_image_folder
cp OSX/README.html breve_image_folder
cp docBuild/images/breve_icon.jpg breve_image_folder/breve_icon.jpg
cp -R docs breve_image_folder/Documentation
cp Changes.html GPL.txt breve_image_folder
mkdir breve_image_folder/plugins
cp -R plugins/samples breve_image_folder/plugins
cp plugins/slBrevePluginAPI.h plugins/README.txt breve_image_folder/plugins
find breve_image_folder -name '.svn' -prune -exec rm -rf {} \;
make_dmg.sh $(DMG_FILE) breve_image_folder/*
rm -rf breve_image_folder
CLI_release: clean
$(MAKE) optimize
$(MAKE) -j1 documentation
rm -rf $(CLI_FOLDER)
mkdir -p $(CLI_FOLDER)/bin
mkdir $(CLI_FOLDER)/lib
cp bin/breve@EXE_SUFFIX@ $(CLI_FOLDER)/bin
ifeq ($(PLATFORM),linux-gnu)
mv $(CLI_FOLDER)/bin/breve@EXE_SUFFIX@ $(CLI_FOLDER)/bin/breve_ex@EXE_SUFFIX@
cp bin/breve.sh $(CLI_FOLDER)/bin/breve@EXE_SUFFIX@
cp bin/breve_cli.sh $(CLI_FOLDER)/bin/breve_cli@EXE_SUFFIX@
cp bin/libpython2.4.so.1.0 $(CLI_FOLDER)/bin
cp bin/libOSMesa.so $(CLI_FOLDER)/bin
endif
-cp bin/osmesaloader.o $(CLI_FOLDER)/bin
cp -R docs $(CLI_FOLDER)
cp -R lib $(CLI_FOLDER)
cp -R demos $(CLI_FOLDER)
rm -rf $(CLI_FOLDER)/demos/Music
mkdir $(CLI_FOLDER)/plugins
cp -R plugins/samples $(CLI_FOLDER)/plugins
rm -f $(CLI_FOLDER)/plugins/samples/Makefile.in
ifeq ($(PLATFORM),windows)
cp lib/brevePlugin.lib $(CLI_FOLDER)/plugins
cp lib/breveIDEPlugin.lib $(CLI_FOLDER)/plugins
cp bin/glut32.dll $(CLI_FOLDER)/bin
cp bin/python23.dll $(CLI_FOLDER)/bin
cp bin/mingwm10.dll $(CLI_FOLDER)/bin
endif
cp plugins/slBrevePluginAPI.h plugins/README.txt $(CLI_FOLDER)/plugins
cp Changes.html GPL.txt README.txt $(CLI_FOLDER)
find $(CLI_FOLDER) -name CVS -prune -exec rm -rf {} \;
find $(CLI_FOLDER) -name '.cvsignore' -prune -exec rm -rf {} \;
find $(CLI_FOLDER) -name '.svn' -prune -exec rm -rf {} \;
rm -f breve_$(LPLATFORM)_@VERSION@.@ARCHIVE_SUFFIX@
@ARCHIVER@ breve_$(LPLATFORM)_@VERSION@.@ARCHIVE_SUFFIX@ $(CLI_FOLDER)
rm -rf $(CLI_FOLDER)
WX_release: clean
$(MAKE) optimize
$(MAKE) -j1 documentation
cd wx; make
rm -rf $(IDE_FOLDER)
mkdir $(IDE_FOLDER)
mkdir $(IDE_FOLDER)/lib
cp wx/breveIDE@EXE_SUFFIX@ $(IDE_FOLDER)
ifeq ($(PLATFORM),linux-gnu)
mv $(IDE_FOLDER)/breveIDE@EXE_SUFFIX@ $(IDE_FOLDER)/breveIDE_ex@EXE_SUFFIX@
cp bin/breveIDE.sh $(IDE_FOLDER)/breveIDE@EXE_SUFFIX@
cp bin/libpython2.4.so.1.0 $(IDE_FOLDER)/lib
cp bin/libOSMesa.so $(IDE_FOLDER)/lib
endif
-mkdir docs
cp -R docs $(IDE_FOLDER)
cp -R lib $(IDE_FOLDER)
cp -R demos $(IDE_FOLDER)
rm -rf $(IDE_FOLDER)/demos/Music
mkdir $(IDE_FOLDER)/plugins
cp -R plugins/samples $(IDE_FOLDER)/plugins
rm -f $(IDE_FOLDER)/plugins/samples/Makefile.in
cp plugins/slBrevePluginAPI.h plugins/README.txt $(IDE_FOLDER)/plugins
cp Changes.html GPL.txt README.txt $(IDE_FOLDER)
ifeq ($(PLATFORM),windows)
cp lib/brevePlugin.lib $(IDE_FOLDER)/plugins
cp lib/breveIDEPlugin.lib $(IDE_FOLDER)/plugins
cp bin/glut32.dll $(IDE_FOLDER)
cp bin/python23.dll $(IDE_FOLDER)
cp bin/mingwm10.dll $(IDE_FOLDER)
unix2dos $(IDE_FOLDER)/README.txt
unix2dos $(IDE_FOLDER)/GPL.txt
endif
find $(IDE_FOLDER) -name CVS -prune -exec rm -rf {} \;
find $(IDE_FOLDER) -name '.cvsignore' -prune -exec rm -rf {} \;
find $(IDE_FOLDER) -name '.svn' -prune -exec rm -rf {} \;
rm -f breveIDE_$(LPLATFORM)_@VERSION@.@ARCHIVE_SUFFIX@
@ARCHIVER@ breveIDE_$(LPLATFORM)_@VERSION@.@ARCHIVE_SUFFIX@ $(IDE_FOLDER)
rm -rf $(IDE_FOLDER)
install: optimize
mkdir -p @bindir@
cp bin/breve @bindir@
mkdir -p @libdir@/breve
rm -rf @libdir@/breve/classes
cp -R lib/classes @libdir@/breve