#**************************************************************************
#
#	Copyright (c) 2000  ICP Electronics Inc.  All Rights Reserved.
#
#	FILE:
#		Makefile
#
#	Abstract:
#		Makefile for quota library.
#
#	Commnet :
#		Please use root user to make install & testlock
#
#	HISTORY:
#		10/08/01	Kevin Liao Created
#**************************************************************************

TARGET = libuLinux_statistics
CC = $(CROSS_COMPILE)gcc
STRIP=$(CROSS_COMPILE)strip
CFLAG = -fPIC -Wall -c -O2
INCLUDE = -I../uLinux -I../include

# To enable debug message dump, un-comment the following flag
#DEBUG_FLAG = -g -DDEBUG

OBJS = userManager.o

all: 	$(OBJS)
	$(CC) $(DEBUG_FLAG) -shared -Wl,-soname,${TARGET}.so.0 -o ${TARGET}.so.0.0 ${OBJS} -L${TARGET_PREFIX}/lib -lc

%.o : %.c
	$(CC) $(INCLUDE) $(CFLAG) $(DEBUG_FLAG) $< -o $@

install:	all
	$(STRIP) $(TARGET).so.0.0
	install -m 644 $(TARGET).so.0.0  $(TARGET_PREFIX)/usr/lib
	ln -sf $(TARGET).so.0.0  $(TARGET_PREFIX)/usr/lib/$(TARGET).so.0
	ln -sf $(TARGET).so.0  $(TARGET_PREFIX)/usr/lib/$(TARGET).so

clean:
	rm -f *.o
	rm -f $(TARGET).so.0.0
	rm -f *~

