summaryrefslogtreecommitdiff
path: root/cad/openctm/files/patch-lib_Makefile.linux
diff options
context:
space:
mode:
authorDiane Bruce <db@FreeBSD.org>2020-03-15 00:39:34 +0000
committerDiane Bruce <db@FreeBSD.org>2020-03-15 00:39:34 +0000
commit066916c91c5d4730706cdaa69f306cd45b50652a (patch)
tree170ca1d38531da55119331757214a40944102ce1 /cad/openctm/files/patch-lib_Makefile.linux
parentNew port: math/dune-typetree: DUNE framework: The TypeTree library (diff)
OpenCTM is a file format, a software library and a tool set for compression
of 3D triangle meshes. The geometry is compressed to a fraction of comparable file formats (3DS, STL, COLLADA...), and the format is accessible through a simple, portable API WWW: https://sourceforge.net/projects/openctm/
Diffstat (limited to 'cad/openctm/files/patch-lib_Makefile.linux')
-rw-r--r--cad/openctm/files/patch-lib_Makefile.linux32
1 files changed, 32 insertions, 0 deletions
diff --git a/cad/openctm/files/patch-lib_Makefile.linux b/cad/openctm/files/patch-lib_Makefile.linux
new file mode 100644
index 000000000000..277a200e34d3
--- /dev/null
+++ b/cad/openctm/files/patch-lib_Makefile.linux
@@ -0,0 +1,32 @@
+--- lib/Makefile.linux.orig 2020-03-15 00:27:35 UTC
++++ lib/Makefile.linux
+@@ -27,9 +27,9 @@
+ ###############################################################################
+
+ LZMADIR = liblzma
+-CC = gcc
+-CFLAGS = -O3 -W -Wall -c -fPIC -DOPENCTM_BUILD -I$(LZMADIR) -DLZMA_PREFIX_CTM -std=c99 -pedantic
+-CFLAGS_LZMA = -O3 -W -Wall -c -fPIC -DLZMA_PREFIX_CTM -std=c99 -pedantic
++CC ?= cc
++CFLAGS_CTM = -DOPENCTM_BUILD -I$(LZMADIR) -DLZMA_PREFIX_CTM -std=c99 -pedantic
++CFLAGS_LZMA = -DLZMA_PREFIX_CTM -std=c99 -pedantic
+ RM = rm -f
+ DEPEND = $(CPP) -MM
+
+@@ -67,13 +67,13 @@ clean:
+ $(RM) $(DYNAMICLIB) $(OBJS) $(LZMA_OBJS)
+
+ $(DYNAMICLIB): $(OBJS) $(LZMA_OBJS)
+- gcc -shared -s -Wl,-soname,$@ -o $@ $(OBJS) $(LZMA_OBJS) -lm
++ $(CC) -shared -s -Wl,-soname,$@ -o $@ $(OBJS) $(LZMA_OBJS) -lm
+
+ %.o: %.c
+- $(CC) $(CFLAGS) $<
++ $(CC) -c -fPIC $(CFLAGS_CTM) $(CFLAGS_LZMA) $<
+
+ %.o: $(LZMADIR)/%.c
+- $(CC) $(CFLAGS_LZMA) $<
++ $(CC) -c -fPIC $(CFLAGS) $(CFLAGS_LZMA) $<
+
+ depend:
+ $(DEPEND) $(SRCS) $(LZMA_SRCS) > make.depend