
# Copyright Notices

# This software was developed for use by the U.S. Government as
# represented by the Administrator of the National Aeronautics and
# Space Administration. No copyright is claimed in the United States
# under 17 U.S.C. 105.

# This software may be used, copied, and provided to others only as
# permitted under the terms of the contract or other agreement under
# which it was acquired from the U.S. Government.  Neither title to nor
# ownership of the software is hereby transferred.  This notice shall
# remain on all copies of the software.

include ../commonMakeOptions.imake

OBJECTS = ModelLoader.o ddlModelParserWrapper.o

ifeq (,$(JAM))

ifneq (,$(findstring CYGWIN,$(THIS_OS)))
all: $(OBJECTS) 
	echo $@ > $@
else
all: libModelLoader.o
	echo $@ > $@
endif

libModelLoader.o: $(OBJECTS)
	$(LD_DIR)/ld -r -o $@ $(OBJECTS)

tests:

clean:
	/bin/rm -f *.o *.so *.a all depend core clean

TEST_EXTRA_INCLS = -I../ModelManager \
	-Iantlr/include -Inddl2ddl -Inddlparser -Inddlxml -Itinyxml -Iutil

else

ifneq (,$(findstring CYGWIN,$(THIS_OS)))
all: ALWAYS
	$(JAM) libModelLoader.o all-objects.txt
else
all: ALWAYS
	$(JAM) libModelLoader.o
endif

tests: ALWAYS
	$(JAM) tests

clean:
	/bin/rm -f all depend core clean
	$(JAM) clean

TEST_EXTRA_INCLS = -Iantlr/include -Inddl2ddl -Inddlparser -Inddlxml -Itinyxml -Iutil

endif

libModelLoader.a : $(OBJECTS)
	$(AR) $@ $?
	$(RANLIB) $@

libModelLoader.so: $(OBJECTS)
	$(LD) $(LDFLAG) -o $@ $(OBJECTS) $(LIBS)

depend: *.cc makefile $(EUROPA_DIR)/Includes/version.hh
	$(DEPEND)
	test -s $@

ALWAYS:

include depend
