Skip to content

Commit

Permalink
Changed buildsystems from automake to plain make.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thulinma committed Jan 5, 2014
1 parent cfb8edf commit 33427f1
Show file tree
Hide file tree
Showing 11 changed files with 106 additions and 149 deletions.
10 changes: 6 additions & 4 deletions .gitignore
@@ -1,15 +1,16 @@
#ignore object files and nonsense like that
*.[oa]
*.la
*.lo
*.o
*.orig
*.bak
*~
.deps
Makefile
Makefile.in
version.m4
docs
nbproject
autom4te.cache
/libmist.so
/libmist.a
/configure
/config.*
/aclocal.m4
Expand All @@ -27,3 +28,4 @@ libtool
*.json
*.pc
*.swp

1 change: 0 additions & 1 deletion AUTHORS

This file was deleted.

7 changes: 0 additions & 7 deletions ChangeLog

This file was deleted.

62 changes: 62 additions & 0 deletions Makefile
@@ -0,0 +1,62 @@
prefix = /usr
exec_prefix = $(prefix)
includedir = $(prefix)/include
libdir = $(exec_prefix)/lib

PACKAGE_VERSION := $(shell git describe --tags 2> /dev/null || cat VERSION 2> /dev/null || echo "Unknown")
DEBUG = 4

ifeq ($(PACKAGE_VERSION),Unknown)
$(warning Version is unknown - consider creating a VERSION file or fixing your git setup.)
endif

CPPFLAGS = -Wall -g -O2 -fPIC -DDEBUG="$(DEBUG)" -DPACKAGE_VERSION="\"$(PACKAGE_VERSION)\""

LDLIBS = -lcrypto


.DEFAULT_GOAL := all

all: libmist.so libmist.a

DOXYGEN := $(shell doxygen -v 2> /dev/null)
ifdef DOXYGEN
all: docs
else
$(warning Doxygen not installed - not building source documentation.)
endif

objects := $(patsubst %.cpp,%.o,$(wildcard lib/*.cpp))


libmist.so: $(objects)
$(CXX) -shared -o $@ $(LDLIBS) $^

libmist.a: $(objects)
$(AR) -rcs $@ $^

docs: lib/*.h lib/*.cpp Doxyfile
doxygen ./Doxyfile > /dev/null

clean:
rm -f lib/*.o libmist.so libmist.a
rm -rf ./docs

install: libmist.so libmist.a lib/*.h
mkdir -p $(DESTDIR)$(includedir)/mist
install lib/*.h $(DESTDIR)$(includedir)/mist/
install libmist.so $(DESTDIR)$(libdir)/libmist.so
install libmist.a $(DESTDIR)$(libdir)/libmist.a
$(POST_INSTALL)
ldconfig

uninstall:
rm -f $(DESTDIR)$(includedir)/mist/*.h
rmdir $(DESTDIR)$(includedir)/mist
rm -f $(DESTDIR)$(libdir)/libmist.so
rm -f $(DESTDIR)$(libdir)/libmist.a

.PHONY: clean uninstall



5 changes: 0 additions & 5 deletions Makefile.am

This file was deleted.

7 changes: 0 additions & 7 deletions NEWS

This file was deleted.

42 changes: 35 additions & 7 deletions README
@@ -1,9 +1,37 @@
For full documentation as well as background information, visit our wiki at:
http://wiki.mistserver.com/
_________________________________________________
| Mist Libraries |
| Copyright 2010-2014 DDVTech BV, The Netherlands |
| |
| Licensed under the aGPLv3 license |
| See COPYING file for full license |
|_________________________________________________|

Code contributions and bug reports are welcomed through:
https://github.com/DDVTECH/libmist

The following configure options are possible:
--enable-verbose = Compiles the libraries in verbose mode, printing a lot more information to the screen than normally.
--disable-verbose = The opposite of above (default).
The latest version of this code can always be found at:
https://github.com/DDVTECH/mistlib

For full documentation/changelogs/etc visit our wiki at:
http://wiki.mistserver.com/

Code contributions and bug reports are welcomed! Please submit at:
https://github.com/DDVTECH/mistlib

To install using default options, simply run:
make && sudo make install

Dependencies:
openssl

The makefile will listen to the following variables:
DEBUG Sets the debug message level. 4 is the default (and recommended setting for development), 0 is quiet, 10 is insanely high.
PACKAGE_VERSION Overrides the library version number string. You shouldn't need to use this, normally.
prefix Prefix to install files to. Defaults to /usr
exec_prefix Prefix to install object code and binaries to. Defaults to $(prefix)
includedir Directory to install headers to. Defaults to $(prefix)/include
libdir Directory to install libraries to. Defaults to $(exec_prefix)/lib
DESTDIR Global prefix that will be put in front of any and all other file paths.
CPPFLAGS Flags for compiling object files. Defaults to -Wall -g -O2 -fPIC -DDEBUG="$(DEBUG)" -DPACKAGE_VERSION="\"$(PACKAGE_VERSION)\""
LDLIBS Libraries to include. Defaults to -lcrypto

Use "make var1=val1 var2=val2" to set these. For example:
make install DEBUG=0 prefix=/usr/local
52 changes: 0 additions & 52 deletions configure.ac

This file was deleted.

7 changes: 3 additions & 4 deletions createhooks.sh
@@ -1,10 +1,9 @@
#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
echo -e "#!/bin/bash\n[ -f configure ] && touch configure\n[ -f configure.ac ] && touch configure.ac" > $DIR/.git/hooks/post-commit
echo -e "#!/bin/bash\n[ -f configure ] && touch configure\n[ -f configure.ac ] && touch configure.ac" > $DIR/.git/hooks/post-checkout
echo -e "#!/bin/bash\n[ -f configure ] && touch configure\n[ -f configure.ac ] && touch configure.ac" > $DIR/.git/hooks/post-merge
echo -e "#!/bin/bash\nmake clean" > $DIR/.git/hooks/post-commit
echo -e "#!/bin/bash\nmake clean" > $DIR/.git/hooks/post-checkout
echo -e "#!/bin/bash\nmake clean" > $DIR/.git/hooks/post-merge
chmod +x $DIR/.git/hooks/post-commit
chmod +x $DIR/.git/hooks/post-checkout
chmod +x $DIR/.git/hooks/post-merge
echo "Done! The version number should now auto-update whenever you commit or checkout."

52 changes: 0 additions & 52 deletions lib/Makefile.am

This file was deleted.

10 changes: 0 additions & 10 deletions lib/mist-1.0.pc.in

This file was deleted.

0 comments on commit 33427f1

Please sign in to comment.