Menu

[30a0cb]: / lib / makelib  Maximize  Restore  History

Download this file

29 lines (21 with data), 1.0 kB

#!/bin/sh

# This file creates libCppMonster.a, which is the library file you
# should use when accessing Monster from C++. Note that libCppMonster
# is not a stand-alone library, it depends on libMonster.a as well.

# If you wish to create bindings for other languages than C++, you
# should model after monster.cpp and monster.h, and remember to
# include init.d in the resulting library. Your language must support
# C linkage.

# This script will attempt to copy the dsss-generated monster library
# from the parent directory and call it libMonster.a. If this fails
# you will have to compile the library first and run the script again
# or copy it manually.

# Remove the old file (if any)
rm libCppMonster.a

# Copy libMonster.a from parent directory.
cp ../libmonster.a libMonster.a

# Compile the extra objects that constitute the Cpp bindings. 
dmd -c -version=Posix _mninit.d -I../ || exit
g++ -I../include -c monster.cpp || exit

# Create the library file
ar rvs libCppMonster.a _mninit.o monster.o
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.