From 65ac4ee9a59d62a4c65765bc31a2f3380084f270 Mon Sep 17 00:00:00 2001 From: David Hendriks <davidhendriks93@gmail.com> Date: Mon, 18 Nov 2019 14:27:42 +0000 Subject: [PATCH] copied old makefile --- old_makefile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 old_makefile diff --git a/old_makefile b/old_makefile new file mode 100644 index 000000000..c9c00e654 --- /dev/null +++ b/old_makefile @@ -0,0 +1,35 @@ +# Makefile for Rapid Binary Star Evolution program + +# you will need to set the BINARY_C variable to point +# to the root binary_c directory +ifeq ($(BINARY_C),) + $(error BINARY_C is not set) +endif + + +CC := gcc +LD := gcc +PROGRAM := binary_c_python_api +MAKE := /usr/bin/make +LIBS := -lbinary_c $(shell $(BINARY_C)/binary_c-config --libs) +#`$(BINARY_C)/binary_c-config --libdirs_list` +C_SRC := binary_c_python_api.c +OBJECTS := $(C_SRC:.c=.o) +OBJ_FLAGS := -c +CFLAGS := -fPIC $(shell $(BINARY_C)/binary_c-config --flags | sed s/-fvisibility=hidden// ) -I$(BINARY_C)/src/ -I$(BINARY_C)/src/API +SO_FLAGS := -shared -o +SO_NAME := libbinary_c_api.so + +# To create python shared library +PY_EXEC := python3 +PY_SETUP := setup.py +PY_OPTIONS := build_ext --inplace + +all: $(OBJECTS) + $(CC) -DBINARY_C=$(BINARY_C) $(CFLAGS) $(INCDIRS) $(C_SRC) $(OBJ_FLAGS) $(INCDIRS) $(LIBS) + $(CC) -DBINARY_C=$(BINARY_C) $(SO_FLAGS) $(SO_NAME) $(OBJECTS) + $(PY_EXEC) $(PY_SETUP) $(PY_OPTIONS) + +clean: + rm -f *.o *.so + rm -rf build/ -- GitLab