export
ifeq (, $(ARM_TARGET))
CC := g++
CFLAGS	=	-Wall -W -O2
LD := ld
AR := ar
RANLIB := ranlib
STRIP := strip
else
ARM := /usr/local/linux-arm
CC := /usr/local/arm/3.3.2/bin/arm-linux-g++
LD := /usr/local/arm/3.3.2/bin/arm-linux-ld
AR := /usr/local/arm/3.3.2/bin/arm-linux-ar
RANLIB := /usr/local/arm/3.3.2/bin/arm-linux-ranlib
STRIP := /usr/local/arm/3.3.2/bin/arm-linux-strip
CFLAGS := -O2 -Wall -W -Wstrict-prototypes -pipe -mshort-load-bytes -march=armv4 -mtune=strongarm110 -fno-strict-aliasing
endif

INCPATH = -I../libexception/ \
	  -I../libutils
LINK    = 
LFLAGS  = 
LIBS    = 

HEADERS = ConfigAbs.h \
	  ConfigImp.h \
	  ConfigFileImp.h \
	  ConfigXMLImp.h
SOURCES = ConfigAbs.cpp \
	  ConfigImp.cpp \
	  ConfigFileImp.cpp \
	  ConfigXMLImp.cpp

OBJECTS = ConfigAbs.o \
	  ConfigImp.o \
	  ConfigFileImp.o \
	  ConfigXMLImp.o
TARGET  = config 

.SUFFEXES: .cpp .c .C

.cpp.o:	
	$(CC) -c -I../libexception $(CFLAGS) $(INCPATH) -o $@ $<
.C.o:
	$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<
.c.o:
	$(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<

all: $(TARGET)

$(TARGET): $(OBJECTS)
	$(AR) rc libconfig.a $(OBJECTS)
	$(RANLIB) libconfig.a

clean:
	-rm -f $(OBJECTS)
	-rm -f *~ core
	-rm -f libutils.a

ConfigAbs.o: ConfigAbs.cpp ConfigAbs.h 

ConfigImp.o: ConfigImp.cpp ConfigImp.h

ConfigFileImp.o: ConfigFileImp.cpp ConfigFileImp.h

ConfigXMLImp.o: ConfigXMLImp.cpp ConfigXMLImp.h

MemoryUtil.o: MemoryUtil.cpp MemoryUtil.h


