# # Makefile to create a shared-object file for use with the "dsp486" command # # To compile the shared object file, make any appropriate changes below # and type "make" at the command-line prompt. (this should create the # "libdsp.so" file that the dsp486 command will look for.) # # Normally, only the LOBJS line should be modified, so that all needed # files are included in the shared object file... This file is written # assuming that the plugin routines are stored in "dsp.c", and that no # other source files are required. # # To link to additional source code files (For example, "subs1.c", "subs2.c" # and "my_fir_filter_routines.c", replace the LOBJS line with something like: # LOBJS=dsp.o subs1.o subs2.o my_fir_filter_routines.o # # (Notice that the ".c" extension has been replace with ".o" # LOBJS=dsp.o # Don't change this name...dsp486 will look for "libdsp.so" LIB=dsp LIBF=-shared -WI,-soname,lib${LIB}.so all: lib${LIB}.so ${EXE} # # The CFLAGS part of the following includes "-g" to support symbolic debugging. # But this also prevents any compiler optimization. Removing "-g" (after you've # debugged your code!) should improve the execution time of your program. # # If you want the compiler to work hard to optimize the executable, try replacing # "-g" with "-O1", "-O2", or "-O3". # lib${LIB}.so: CFLAGS=-fPIC -rdynamic -g -Wall lib${LIB}.so: ${LOBJS} ${CC} -o lib${LIB}.so ${LOBJS} ${LIBF} clean: rm -f *.o core* ${EXE} lib${LIB}.so