/usr/share/gromacs/template/Makefile.pkg is in libgromacs-dev 5.1.2-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | # This is a GROMACS template makefile for your own utility programs using pkg-config.
#
# Copy this file to whatever directory you are using for your own software
#
# Usage:
# $ source /path/to/GMXRC
# $ make -f Makefile.pkg
#
#change the name of the program here
NAME=template
#add extra c++ file(s) to compile here
EXTRA_SRC=
###############################################################3
#below only boring default stuff
#only change it if you know what you are doing ;-)
#what should be done by default
all: $(NAME)
#if GMXLDLIB is defined we add it to PKG_CONFIG_PATH
ifeq "$(origin GMXLDLIB)" "undefined"
$(error "GMXLDLIB not found, please source GMXRC")
else
export PKG_CONFIG_PATH:=${PKG_CONFIG_PATH}:${GMXLDLIB}/pkgconfig
endif
#get CPPFLAGS and LDFLAGS from pkg-config
CPPFLAGS=`pkg-config --cflags libgromacs`
LDFLAGS=`pkg-config --libs libgromacs`
#generate a list of object (.o) files
OBJS=$(patsubst %.cpp,%.o,$(NAME).cpp $(EXTRA_SRC))
#main program depend on all objects, rest is done by implicit rules
$(NAME): $(OBJS)
$(CXX) $(LDFLAGS) -o $@ $^
#clean up rule
clean:
rm -f $(NAME) $(OBJS)
#all, clean are phony rules, e.g. they are always run
.PHONY: all clean
|