# creates disum1.so, disum2.so, disum3.so
#         disumt1.so, disumt2.so, disumt3.so
# from their similarly-named .c routines.
#
# The CFLAGS option '-fPIC' below produces position-independent code
# for dynamic linking, but may not be supported on your target machine.
#
# Note that when this was written (Feb 5, 2009), IDL only
# supported 32-bit code so the below CFLAGS of 'm32' and
# LFLAGS of '-melf_i386' were to make the appropriately
# compatible libraries on a native Linux 64-bit system.
# If you have a different computer, compiler, or IDL version
# you may need to modify that.
#

GCC = cc
CFLAGS = -fPIC -m32
LFLAGS = -melf_i386

all:	disum1 disum2 disum3 disumt1 disumt2 disumt3

disum1:	disum1.c
	$(GCC) $(CFLAGS) -c $@.c
	ld $(LFLAGS) -o $@.so -shared $@.o

disum2:	disum2.c
	$(GCC) $(CFLAGS) -c $@.c
	ld $(LFLAGS) -o $@.so -shared $@.o

disum3:	disum3.c
	$(GCC) $(CFLAGS) -c $@.c
	ld $(LFLAGS) -o $@.so -shared $@.o

disumt1:	disumt1.c
	$(GCC) $(CFLAGS) -c $@.c
	ld $(LFLAGS) -o $@.so -shared $@.o

disumt2:	disumt2.c
	$(GCC) $(CFLAGS) -c $@.c
	ld $(LFLAGS) -o $@.so -shared $@.o

disumt3:	disumt3.c
	$(GCC) $(CFLAGS) -c $@.c
	ld $(LFLAGS) -o $@.so -shared $@.o
