File: Makefile.h5cc

package info (click to toggle)
lammps 20250204%2Bdfsg.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 474,368 kB
  • sloc: cpp: 1,060,070; python: 27,785; ansic: 8,956; f90: 7,254; sh: 6,044; perl: 4,171; fortran: 2,442; xml: 1,714; makefile: 1,352; objc: 238; lisp: 188; yacc: 58; csh: 16; awk: 14; tcl: 6; javascript: 2
file content (39 lines) | stat: -rw-r--r-- 805 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
EXTRAMAKE=Makefile.lammps.empty

CC=h5cc

# -DH5_NO_DEPRECATED_SYMBOLS is required here to ensure we are using
# the v1.8 API when HDF5 is configured to default to using the v1.6 API.
#CFLAGS=-D_DEFAULT_SOURCE -O2 -DH5_NO_DEPRECATED_SYMBOLS  -Wall -fPIC
CFLAGS=-D_DEFAULT_SOURCE -O2  -Wall -fPIC
HDF5_PATH=/usr
INC=-I include
AR=ar
ARFLAGS=rc
# need to build two libraries to not break compatibility and to support Install.py
LIB=libh5md.a libch5md.a

all: lib Makefile.lammps

build:
	mkdir -p build

build/ch5md.o: src/ch5md.c | build
	$(CC) $(INC) $(CFLAGS) -c $< -o $@

Makefile.lammps:
	cp $(EXTRAMAKE) $@

.PHONY: all lib clean

libch5md.a : build/ch5md.o
	$(AR) $(ARFLAGS) $@ build/ch5md.o

libh5md.a : build/ch5md.o
	$(AR) $(ARFLAGS) $@ build/ch5md.o

lib: $(LIB)

clean:
	rm -f build/*.o $(LIB)