Compiling Fx Operators

 
 
 

Fx operators should be compiled and linked into a dynamic shared object (.so) or dynamically linked object (.dll).

Linux

For example, a simple makefile to build and install an Fx operator might be as follows:

.SUFFIXES:.c .o .ufo
UFO_SRCS = mix.c \
	colour_mix.c \
	swirl.c
UFO_TARGETS = $(UFO_SRCS:.c=.ufo)
UFO_DIR = /var/userdsk/parallax/parallax_process_ufos
$(UFO_TARGETS)::
	cc -c -g $(@:.ufo=.c)
	ld -shared -exports_file export_symbols -o $@ $(@:.ufo=.o)
all:
	make $(UFO_TARGETS)
release:
	- mkdir $(UFO_DIR)
	cp $(UFO_TARGETS) $(UFO_DIR)

The -exports_file export_symbols flag prevents two (or more) UFOs with global functions of the same name from calling each other's functions instead of their own functions. export_symbols is a file containing the symbols for all the UFO user functions. When linked with this flag, all global symbols are hidden apart from the user function global symbols in this file.

Windows

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License