Introduction
Introduction Statistics Contact Development Disclaimer Help
tadd preliminary Makefile - granular - granular dynamics simulation
git clone git://src.adamsgaard.dk/granular
Log
Files
Refs
README
LICENSE
---
commit 2dcd86e8576d54780a1260db7b3fd0103088617f
parent 2f4124a627ccbbe88f190d1c200c3068edf4544a
Author: Anders Damsgaard <[email protected]>
Date: Thu, 18 Mar 2021 00:04:26 +0100
add preliminary Makefile
Diffstat:
A Makefile | 98 +++++++++++++++++++++++++++++…
1 file changed, 98 insertions(+), 0 deletions(-)
---
diff --git a/Makefile b/Makefile
t@@ -0,0 +1,98 @@
+.POSIX:
+
+NAME = granular
+VERSION = 0.1.0
+
+# paths
+PREFIX = /usr/local
+MANPREFIX = ${PREFIX}/share/man
+DOCPREFIX = ${PREFIX}/share/doc/${NAME}
+
+BIN = \
+ granular
+SRC = ${BIN:=.c} arrays.c grain.c simulation.c
+HDR = \
+ arrays.h\
+ grain.h\
+ simulation.h\
+ util.h
+
+LIBS = -lm
+
+CNGFPFCFLAGS = ${CFLAGS} ${INCS} -DVERSION=\"${VERSION}\"
+CNGFPFLDFLAGS = ${LDFLAGS} ${LIBS}
+CNGFPFCPPFLAGS = ${CPPFLAGS}
+
+MAN1 = ${BIN:=.1}
+DOC = \
+ README.md\
+ LICENSE
+
+all: ${BIN}
+
+${BIN}: ${@:=.o}
+
+OBJ = ${SRC:.c=.o}
+
+${OBJ}: ${HDR}
+
+.o:
+ ${CC} -o $@ $< ${CNGFPFLDFLAGS}
+
+.c.o:
+ ${CC} ${CNGFPFCFLAGS} ${CNGFPFCPPFLAGS} -o $@ -c $<
+
+cngf-pf: cngf-pf.o arrays.o fluid.o simulation.o
+ ${CC}\
+ cngf-pf.o arrays.o fluid.o simulation.o\
+ -o $@ ${CNGFPFLDFLAGS}
+
+max_depth_simple_shear: max_depth_simple_shear.o arrays.o fluid.o simulation.o
+ ${CC}\
+ max_depth_simple_shear.o arrays.o fluid.o simulation.o\
+ -o $@ ${CNGFPFLDFLAGS}
+
+shear_flux: shear_flux.o
+ ${CC}\
+ shear_flux.o\
+ -o $@ ${CNGFPFLDFLAGS}
+
+dist:
+ rm -rf "${NAME}-${VERSION}"
+ mkdir -p "${NAME}-${VERSION}"
+ cp -rf ${MAN1} ${DOC} ${HDR} ${SRC} Makefile test "${NAME}-${VERSION}"
+ # make tarball
+ tar cf - "${NAME}-${VERSION}" | \
+ gzip -c > "${NAME}-${VERSION}.tar.gz"
+ rm -rf "${NAME}-${VERSION}"
+
+install: ${BIN}
+ # installing executables
+ mkdir -p ${DESTDIR}${PREFIX}/bin
+ cp -f ${BIN} ${DESTDIR}${PREFIX}/bin
+ for f in ${BIN}; do chmod 755 ${DESTDIR}${PREFIX}/bin/$$f; done
+ # installing documentation and license information
+ mkdir -p ${DESTDIR}${DOCPREFIX}
+ cp -f ${DOC} ${DESTDIR}${DOCPREFIX}
+ for f in ${DOC}; do chmod 644 ${DESTDIR}${DOCPREFIX}/$$f; done
+ # installing man pages
+ mkdir -p ${DESTDIR}${MANPREFIX}/man1
+ cp -f ${MAN1} ${DESTDIR}${MANPREFIX}/man1
+ for f in ${MAN1}; do chmod 644 ${DESTDIR}${MANPREFIX}/man1/$$f; done
+
+uninstall:
+ # removing executable files
+ for f in ${BIN}; do rm -f ${DESTDIR}${PREFIX}/bin/$$f; done
+ # removing documentation and license information
+ for f in ${DOC}; do rm -f ${DESTDIR}${DOCPREFIX}/$$f; done
+ -rmdir ${DESTDIR}${DOCPREFIX}
+ # removing man pages
+ for f in ${MAN1}; do rm -f ${DESTDIR}${MANPREFIX}/man1/$$f; done
+
+test: ${BIN}
+ make -C test/
+
+clean:
+ rm -f ${BIN} ${OBJ} test/*.txt
+
+.PHONY: all install uninstall test clean dist
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.