File: Makefile

package info (click to toggle)
voro++ 0.4.6+dfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,372 kB
  • sloc: cpp: 6,384; perl: 232; makefile: 164
file content (44 lines) | stat: -rw-r--r-- 1,054 bytes parent folder | download
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
# Voro++ makefile
#
# Author : Chris H. Rycroft (LBL / UC Berkeley)
# Email  : chr@alum.mit.edu
# Date   : August 30th 2011

# Load the common configuration file
include ../config.mk

# List of the common source files
objs=cell.o common.o container.o unitcell.o v_compute.o c_loops.o \
     v_base.o wall.o pre_container.o container_prd.o
src=$(patsubst %.o,%.cc,$(objs))

# Makefile rules
all: libvoro++.so.1.0.0 voro++ libvoro++.a

depend:
	$(CXX) -MM $(src) >Makefile.dep

include Makefile.dep

libvoro++.a: $(objs)
	rm -f libvoro++.a
	ar rs libvoro++.a $^

voro++: libvoro++.so cmd_line.cc
	$(CXX) $(CFLAGS) $(LDFLAGS) -L. -o voro++ cmd_line.cc -lvoro++

libvoro++.so.1.0.0: $(objs)
	$(CXX) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,libvoro++.so.1,-z,relro -o libvoro++.so.1.0.0 -lc $(objs)
	ln -s libvoro++.so.1.0.0 libvoro++.so.1
	ln -s libvoro++.so.1.0.0 libvoro++.so

%.o: %.cc
	$(CXX) $(CFLAGS) -c $<

help: Doxyfile $(SOURCE)
	doxygen Doxyfile

clean:
	rm -f $(objs) voro++ libvoro++.a libvoro++.so libvoro++.so.*

.PHONY: all help execs depend