CFLAGS:= -O2 -fPIC -g

CFLAGS+= -I../include

SRCS= \
	cjctapi.c \
	cjio.c \
	cjt1.c

OBJS=$(SRCS:.c=.o)

HDRS= \
	cj.h \
	cjio.h \
	cjt1.h \

all: libctapi-ecom.a

%.o: %.c
	$(CC) $(CFLAGS) -o $@ -c $^

libso: $(OBJS)
	ld -x --shared -o libctapi-ecom.so $(OBJS)

libctapi-ecom.a: $(OBJS)
	ar r $@ $(OBJS)
	-if test -s /bin/ranlib; then /bin/ranlib $@; \
	else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $@; \
	else exit 0; fi; fi

clean:
	rm -f *.o *.a *.so 

