Last commit for Makefile: 43638ec97948da32838baa875d3308432b0e0b37

Added ndmalloc directory to the include path

Ramses van Zon [2017-10-02 18:41:18]
Added ndmalloc directory to the include path
# Makefile using gcc for serdy.c

CC=gcc
#CFLAGS=-std=gnu99 -Wall -g -ipo -xHost -Ofast
#LDFLAGS=-g -O3 -DNDEBUG -xHost -Ofast -ipo
CFLAGS=-std=gnu99 -g -flto -march=native -O3 -ffast-math -I./ndmalloc
LDFLAGS=-g -O3 -DNDEBUG -flto -march=native -ffast-math
LDLIBS=-lm

APPNAME=serdy

OBJFILES=$(APPNAME).o lcg.o lattice.o inifile.o system.o estimates.o forces.o cells.o ndmalloc/ndmalloc.o elapsed.o

TESTOUTFILES=testserdy*.out

all: $(APPNAME)

.PHONY: clean test

$(APPNAME): $(APPNAME).o lcg.o lattice.o system.o inifile.o estimates.o forces.o cells.o ndmalloc/ndmalloc.o

$(APPNAME).o: $(APPNAME).c lattice.h atom.h system.h inifile.h global.h estimates.h forces.h cells.h

ndmalloc/ndmalloc.o: ndmalloc/ndmalloc.c ndmalloc/ndmalloc.h
	$(CC) -c -o $@ $< -DNDREG_PTHREAD_LOCK

cells.o: cells.c cells.h atom.h system.h forces.h global.h debug.h
estimates.o: estimates.c global.h estimates.h
forces.o: forces.c forces.h global.h atom.h
inifile.o: inifile.c inifile.h
lattice.o: lattice.c lattice.h
lcg.o: lcg.c lcg.h
serdy.o: serdy.c lcg.h lattice.h debug.h system.h atom.h inifile.h global.h estimates.h forces.h cells.h
system.o: system.c system.h

clean:
	\rm -f $(OBJFILES) $(TESTOUTFILES)

test: test_serdy_27 test_serdy_503 test_serdy_512 test_serdy_32768

test_serdy_27: $(APPNAME) lj27.ini
	./$(APPNAME) lj27.ini > testserdy27.out

test_serdy_503: $(APPNAME) lj503.ini
	./$(APPNAME) lj503.ini > testserdy503_1_1.out

test_serdy_512: $(APPNAME) lj512.ini
	time -p ./$(APPNAME) lj512.ini > testserdy512_1_1.out

test_serdy_32768: $(APPNAME) lj32768.ini
	time -p ./$(APPNAME) lj32768.ini > testserdy32768_1_1.out
ViewGit