view Makefile @ 51:70df72d2299a default tip

Added unit tests for events.
author Jacob Carlborg <doob@me.com>
date Sat, 13 Aug 2011 17:06:35 +0200
parents 511d1ef4e299
children
line wrap: on
line source

LIBNAME		=	orange
SRC			=	\
	core/io.d \
	core/string.d \
	core/_.d \
	serialization/Events.d \
	serialization/RegisterWrapper.d \
	serialization/Serializable.d \
	serialization/SerializationException.d \
	serialization/Serializer.d \
	serialization/_.d \
	serialization/archives/Archive.d \
	serialization/archives/ArchiveException.d \
	serialization/archives/XMLArchive.d \
	serialization/archives/_.d \
	util/CTFE.d \
	util/Reflection.d \
	util/Traits.d \
	util/Use.d \
	util/_.d \
	util/collection/Array.d \
	util/collection/_.d \
	xml/PhobosXML.d \
	xml/XMLDocument.d \
	xml/_.d \

DC			=	dmd
DCFLAGS		=	-I/usr/include/d -I/usr/local/include/d


UNITTEST = test/UnitTester.d \
	tests/Serializer.d \
	tests/all.d \

# Everything below this line should be fairly generic (with a few hard-coded things).

OBJ         =   $(addsuffix .o,$(addprefix $(LIBNAME)/,$(basename $(SRC))))
TARGET		=	lib/lib$(LIBNAME).a

all : $(TARGET)

install : $(TARGET)
	@echo Installing $(LIBNAME) . . .
	@cp $(TARGET) /usr/local/lib/lib$(LIBNAME).a
	@echo Installing $(LIBNAME) import files . . .
	@cp -r import/$(LIBNAME) /usr/local/include/d/$(LIBNAME)
	@echo done.

uninstall :
	@echo Uninstalling $(LIBNAME) import files . . .
	@rm -rf /usr/local/include/d/$(LIBNAME)
	@echo Uninstalling $(LIBNAME) . . .
	@rm -f /usr/local/lib/lib$(LIBNAME).a
	@echo done.

clean :
	@echo Cleaning $(LIBNAME) . . .
	@rm -rf import lib $(OBJ)
	@echo done.

$(TARGET) : $(OBJ)
	@echo Linking $@ . . .
	@$(DC) -lib $^ -of$@
	@echo done.

%.o : %.d
	@echo Compiling $< . . .
	@$(DC) -c $< -of$@ -Hfimport/$(basename $@).di