-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ghb
committed
Mar 5, 2012
0 parents
commit c6a2e0b
Showing
661 changed files
with
111,017 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
Copyright (c) 2011-2012 Gabriel Hjort Blindell <[email protected]> | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
* Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
* 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. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 AUTHORS OF THIS SOFTWARE NOR THE COPYRIGHT | ||
HOLDERS 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
# Copyright (c) 2011-2012 Gabriel Hjort Blindell <[email protected]> | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# * Redistributions of source code must retain the above copyright notice, | ||
# this list of conditions and the following disclaimer. | ||
# * 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. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 AUTHORS OF THIS SOFTWARE NOR THE | ||
# COPYRIGHT HOLDERS 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. | ||
|
||
unexport | ||
|
||
SEP = "==============================" | ||
export PREBUILDMSG = "$(SEP)\n Building % module...\n" | ||
export POSTBUILDMSG = " Done.\n$(SEP)\n\n" | ||
export ITEMBUILDMSG = " * %\n" | ||
export PRELINKMSG = "$(SEP)\n Linking...\n" | ||
export POSTLINKMSG = $(POSTBUILDMSG) | ||
export ITEMLINKMSG = " * %\n" | ||
export PREDOCSMSG = "$(SEP)" | ||
export POSTDOCSMSG = " Done.\n$(SEP)\n\n" | ||
export PARTDOCSMSG = "%...\n" | ||
|
||
export TARGET = bin | ||
export TARGETPATH = $(CURDIR)/$(TARGET) | ||
export DOMAKE = $(MAKE) --no-print-directory | ||
TESTMODELSPATH = testmodels | ||
TESTBENCHPATH = testbench | ||
|
||
build: $(TARGET) | ||
@$(DOMAKE) -C ./source | ||
|
||
test_environment: clean build | ||
cp $(TESTMODELSPATH)/*.* $(TARGET) | ||
cp $(TESTBENCHPATH)/*.* $(TARGET) | ||
|
||
docs: | ||
@$(DOMAKE) -C ./source docs | ||
|
||
help: | ||
@printf "Usage:" | ||
@printf | ||
@printf "make: same as 'make build'" | ||
@printf "make build: builds the entire f2cc" | ||
@printf "make docs: generates the Doxygen API" | ||
|
||
$(TARGET): | ||
@mkdir -p $(TARGET) | ||
|
||
clean: preclean doclean | ||
@printf $(POSTBUILDMSG) | ||
|
||
preclean: | ||
@printf $(subst Building % module,Cleaning modules,$(PREBUILDMSG)) | ||
|
||
doclean: | ||
@rm -rf $(TARGET) | ||
|
||
.PHONY: clean preclean doclean all $(TARGET) docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# Copyright (c) 2011-2012 Gabriel Hjort Blindell <[email protected]> | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# * Redistributions of source code must retain the above copyright notice, | ||
# this list of conditions and the following disclaimer. | ||
# * 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. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 AUTHORS OF THIS SOFTWARE NOR THE | ||
# COPYRIGHT HOLDERS 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. | ||
|
||
SRCFILES = f2cc.cpp | ||
OBJECTS = $(addprefix $(OBJPATH)/, \ | ||
$(addsuffix .o, $(basename $(SRCFILES))) \ | ||
) | ||
EXEC_ = f2cc | ||
EXEC = $(addprefix $(TARGETPATH)/, $(EXEC_)) | ||
|
||
DEPENDENCIES = ticpp exceptions tools logger forsyde language frontend config \ | ||
synthesizer | ||
DEPOBJECTS = $(addprefix $(OBJPATH)/, \ | ||
$(addsuffix /*.o, $(basename $(DEPENDENCIES))) \ | ||
) | ||
|
||
export LIBPATH = $(TARGETPATH)/lib | ||
export OBJPATH = $(TARGETPATH)/obj | ||
|
||
export CC = g++ | ||
export CCFLAGS = -Wall \ | ||
-DSVNVERSION="\"`svnversion`\"" | ||
export LDFLAGS = | ||
export AR = ar | ||
export ARFLAGS = crf | ||
|
||
all: $(LIBPATH) $(OBJPATH) link | ||
|
||
link: build prelink | ||
@printf $(subst %,$(EXEC_),$(ITEMLINKMSG)) | ||
@$(CC) $(CCFLAGS) $(LDFLAGS) -o $(TARGETPATH)/$(EXEC_) $(OBJECTS) \ | ||
$(DEPOBJECTS) | ||
@printf $(POSTLINKMSG) | ||
|
||
prelink: | ||
@printf $(PRELINKMSG) | ||
|
||
build: $(DEPENDENCIES) prebuild $(OBJECTS) | ||
@printf $(POSTBUILDMSG) | ||
|
||
prebuild: | ||
@printf $(subst %,core,$(PREBUILDMSG)) | ||
|
||
$(LIBPATH) $(OBJPATH): | ||
@mkdir -p $@ | ||
|
||
$(DEPENDENCIES): | ||
@$(DOMAKE) -C ./$@ | ||
|
||
$(OBJPATH)/%.o: %.cpp | ||
@printf $(subst %,$<,$(ITEMBUILDMSG)) | ||
@$(CC) $(CCFLAGS) -o $@ -c $< | ||
|
||
docs: predocs | ||
@printf $(subst %,Building API,$(PARTDOCSMSG)) | ||
@doxygen dox | ||
@printf $(POSTDOCSMSG) | ||
@cat dox.log | ||
|
||
predocs: | ||
@printf $(PREDOCSMSG) | ||
|
||
.PHONY: prebuild $(LIBPATH) $(OBJPATH) docs predocs $(DEPENDENCIES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Copyright (c) 2011-2012 Gabriel Hjort Blindell <[email protected]> | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# * Redistributions of source code must retain the above copyright notice, | ||
# this list of conditions and the following disclaimer. | ||
# * 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. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 AUTHORS OF THIS SOFTWARE NOR THE | ||
# COPYRIGHT HOLDERS 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. | ||
|
||
MODULE = config | ||
SRCFILES = config.cpp | ||
THISOBJPATH = $(OBJPATH)/$(MODULE) | ||
OBJECTS = $(addprefix $(THISOBJPATH)/, \ | ||
$(addsuffix .o, $(basename $(SRCFILES))) \ | ||
) | ||
|
||
build: $(THISOBJPATH) prebuild $(OBJECTS) | ||
@printf $(POSTBUILDMSG) | ||
|
||
$(THISOBJPATH): | ||
@mkdir -p $@ | ||
|
||
prebuild: | ||
@printf $(subst %,$(MODULE),$(PREBUILDMSG)) | ||
|
||
$(THISOBJPATH)/%.o: %.cpp %.h | ||
@printf $(subst %,$<,$(ITEMBUILDMSG)) | ||
@$(CC) $(CCFLAGS) -o $@ -c $< | ||
|
||
.PHONY: prebuild $(THISOBJPATH) |
Oops, something went wrong.