swh:1:snp:122bde0cb0e54f3d002c308e151c63f07e45e6be
Raw File
Tip revision: 4e94bc42eebcd34c3c4c56447064b0ea65a1c811 authored by Ruth-Huang6012 on 19 March 2024, 13:25:49 UTC
Fixed bug in integrator_whfast512.c (#760)
Tip revision: 4e94bc4
Makefile
include Makefile.defs

SOURCES=rebound.c tree.c particle.c gravity.c integrator.c integrator_whfast.c integrator_whfast512.c integrator_saba.c integrator_ias15.c integrator_sei.c integrator_bs.c integrator_leapfrog.c integrator_mercurius.c integrator_eos.c boundary.c input.c binarydiff.c output.c collision.c communication_mpi.c display.c tools.c rotations.c derivatives.c simulationarchive.c glad.c integrator_janus.c transformations.c fmemopen.c server.c
OBJECTS=$(SOURCES:.c=.$(OBJFILEEXT))
HEADERS=$(SOURCES:.c=.h)

all: $(SOURCES) $(LIBREBOUND)

ifneq ($(OS),Windows_NT) 
# Linux, MacOS
%.$(OBJFILEEXT): %.c $(HEADERS)
	@echo "Compiling source file $< ..."
	$(CC) -c $(OPT) $(PREDEF) -o $@ $<

$(LIBREBOUND): $(OBJECTS)
	@echo ""        
	@echo "Linking shared library $@ ..."
	$(CC) $(OPT) -shared $(OBJECTS) $(LIB) -o $@ 
	
	@echo ""        
	@echo "The shared library $< has been created successfully."
else
# Windows
%.$(OBJFILEEXT): %.c $(HEADERS)
	@echo "Compiling source file $< ..."
	$(CC) -c $(OPT) $(PREDEF) /Fo: $@ $<

$(LIBREBOUND): $(OBJECTS)
	@echo ""        
	@echo "Linking shared library $@ ..."
	$(CC) /D_USRDLL /D_WINDLL $(OBJECTS) /link /DLL /OUT:$@ 
	
	@echo ""        
	@echo "The shared library $< has been created successfully."
endif
	
	
clean:
	@echo "Removing object files *.$(OBJFILEEXT) ..."
	@-$(RM) *.$(OBJFILEEXT)
	@echo "Removing shared library $(LIBREBOUND) ..."
	@-$(RM) *.so
	@echo "Removing coverage files ..."
	@-$(RM) *.gcda
	@-$(RM) *.gcno
	
back to top