diff --git a/.gitignore b/.gitignore index b585751..34d93bb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,10 @@ -lib +lib/libpsyc.a doc/html doc/latex doc/man +d/doc/html +d/doc/latex +d/doc/man src/match test/testMatch test/testParser diff --git a/Doxyfile b/Doxyfile index df1212c..38dfdac 100644 --- a/Doxyfile +++ b/Doxyfile @@ -681,7 +681,7 @@ RECURSIVE = YES # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = include/d +EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded diff --git a/Makefile b/Makefile index 43d301b..1cb161a 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,17 @@ all: ${MAKE} -C src +install: install-lib install-inc install-d + +install-lib: all + ${MAKE} -C lib install + +install-inc: all + ${MAKE} -C include install + +install-d: all + ${MAKE} -C d install + debug: ${MAKE} -C src debug @@ -26,4 +37,4 @@ clean: rm -rf doc/html doc/latex doc/man help: - @/bin/echo -e "Usage:\n\tmake - compile\n\tmake diet - compile with diet libc\n\tmake test\n\tmake doc" + @/bin/echo -e "Usage:\n\tmake - compile\n\tmake diet - compile with diet libc\n\tmake test\n\tmake doc\n\tmake install [prefix=/usr]" diff --git a/d/Makefile b/d/Makefile index 987a385..a2e05a4 100644 --- a/d/Makefile +++ b/d/Makefile @@ -2,3 +2,6 @@ doc: doxygen + +install: + ${MAKE} -C include install diff --git a/d/include/Makefile b/d/include/Makefile new file mode 100644 index 0000000..727f0a9 --- /dev/null +++ b/d/include/Makefile @@ -0,0 +1,2 @@ +install: + ${MAKE} -C psyc install diff --git a/d/include/psyc/Makefile b/d/include/psyc/Makefile new file mode 100644 index 0000000..d474c2f --- /dev/null +++ b/d/include/psyc/Makefile @@ -0,0 +1,13 @@ +prefix = /usr +includedir = ${prefix}/include/d + +INSTALL = install +HEADERS = common.d parser.d + +install: ${HEADERS} + +installdir: + ${INSTALL} -d ${includedir}/psyc + +${HEADERS}: installdir + ${INSTALL} -m 644 $@ ${includedir}/psyc diff --git a/include/Makefile b/include/Makefile new file mode 100644 index 0000000..6fe5d21 --- /dev/null +++ b/include/Makefile @@ -0,0 +1,14 @@ +prefix = /usr +includedir = ${prefix}/include + +INSTALL = install +HEADERS = psyc.h + +install: ${HEADERS} + ${MAKE} -C psyc install + +installdir: + ${INSTALL} -d ${includedir} + +${HEADERS}: installdir + ${INSTALL} -m 644 $@ ${includedir} diff --git a/include/psyc/Makefile b/include/psyc/Makefile new file mode 100644 index 0000000..9733a9d --- /dev/null +++ b/include/psyc/Makefile @@ -0,0 +1,13 @@ +prefix = /usr +includedir = ${prefix}/include + +INSTALL = install +HEADERS = packet.h parser.h render.h syntax.h text.h + +install: ${HEADERS} + +installdir: + ${INSTALL} -d ${includedir}/psyc + +${HEADERS}: installdir + ${INSTALL} -m 644 $@ ${includedir}/psyc diff --git a/lib/Makefile b/lib/Makefile new file mode 100644 index 0000000..6b53b18 --- /dev/null +++ b/lib/Makefile @@ -0,0 +1,13 @@ +prefix = /usr +libdir = ${prefix}/lib + +INSTALL = install +LIBS = libpsyc.a + +install: ${LIBS} + +libdir: + ${INSTALL} -d ${libdir} + +${LIBS}: libdir + ${INSTALL} $@ ${libdir}