From ac239d7be2755dc28fa831ba15a0fb318848a5a6 Mon Sep 17 00:00:00 2001 From: AwesomeAdam54321 Date: Sun, 12 Mar 2023 01:30:46 +0800 Subject: [PATCH] libgeramun: Add Makefile. Adapted from https://gitlab.com/hydren/terrarium/-/raw/master/build/linux-gcc-sdl2-release/src_libs/libgeramun/subdir.mk --- Makefile | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8d37ce4 --- /dev/null +++ b/Makefile @@ -0,0 +1,59 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +CPP_SRCS += \ +brush.cpp \ +cave.cpp \ +debug.cpp \ +generators.cpp \ +midpoint_displacement.cpp \ +miners.cpp \ +preview_callback.cpp \ +random_walk.cpp \ +spring.cpp \ +surf_replacer.cpp + +OBJS += \ +brush.so \ +cave.so \ +debug.so \ +generators.so \ +midpoint_displacement.so \ +miners.so \ +preview_callback.so \ +random_walk.so \ +spring.so \ +surf_replacer.so + +SRCDIR ?= . +INCLUDE_PATH ?= ${SRCDIR}/include +PREFIX ?= /usr/local + +all: libgeramun.so + +libgeramun.so: $(OBJS) $(USER_OBJS) + @echo 'Building target: $@' + @echo 'Invoking: GCC C++ Linker' + g++ -shared -o "libgeramun.so" $(OBJS) $(USER_OBJS) $(LIBS) + @echo 'Finished building target: $@' + @echo ' ' + +install: all + install -d $(DESTDIR)$(PREFIX) + cp -r include $(DESTDIR)$(PREFIX) + install -d $(DESTDIR)$(PREFIX)/lib + install -m 644 libgeramun.so $(DESTDIR)$(PREFIX)/lib + +%.so: %.cpp + @echo 'Building file: $<' + @echo 'Invoking: GCC C++ Compiler' + g++ -I${INCLUDE_PATH} -O3 -Wall -shared -fPIC -c -fmessage-length=0 -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<" + @echo 'Finished building: $<' + @echo ' ' + +clean: + rm $(wildcard *.so) + + -- 2.39.2