SRC = array.c    double.c  integer.c  long.c    set.c     unit.c \
           char.c     float.c   intset.c   map.c     short.c   void_ast.c\
           complex.c  hash.c    list.c     object.c  string.c
HEADERS = array.h    double.h  integer.h  long.h    object_int.h  string.h \
char.h     float.h   intset.h   map.h     set.h         unit.h \
complex.h  hash.h    list.h     object.h  short.h       void_ast.h


# DEBUG=-g
DEBUG=

RELEASE=-O
#RELEASE=-pg

#LINK_RELEASE=-pg

LINK_FLAG=$(DEBUG)
LIBS=

CXX=gcc

INCD=-I..

CXXCOMP= $(CXX) $(INCD) $(DEBUG) $(RELEASE) -DPTHREAD -std=c89
CXXLINK= $(CXX) $(LINK_FLAG)
MAKEAR= ar r

RM=rm -rf

OBJS= ${SRC:.c=.o}

all: libatl.a


libatl.a: $(OBJS)
	$(MAKEAR) libatl.a $(OBJS)
	ranlib libatl.a


#CXXCOMP_FLAGS=-fPIC
libatl.so.2.2.0: $(OBJS)
	$(CXXLINK) -shared -o $@ -Wl,-soname="libatl.so.2.2" 

clean:
	- $(RM) $(TEMP_FILES) core

.SUFFIXES:  .o .c .i .cpp

.cpp.o:
	$(CXXCOMP) -c $*.cpp

.c.o:
	$(CXXCOMP) -c $*.c

.cpp.i:
	$(CXXCOMP) -E $*.cpp > $*.i

.c.i:
	$(CXXCOMP) -E $*.c > $*.i

TEMP_FILES= *.o *.a *.i *.i0 *.i1 *.i2 *.i3 errors


