1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
RAW_APIS = evolution-api-1.6.raw evolution-api-1.4.raw evolution-api-1.2.raw
if USE_EDS12
RAW_API = evolution-api-1.2.raw
endif
if USE_EDS14
RAW_API = evolution-api-1.4.raw
endif
if USE_EDS16
RAW_API = evolution-api-1.6.raw
endif
API=evolution-api.xml
METADATA = Evolution.metadata
ASSEMBLY_NAME = evolution-sharp
references = $(GTK_SHARP_LIBS)
TARGET = $(ASSEMBLY)
ASSEMBLY = $(ASSEMBLY_NAME).dll
gapidir = $(datadir)/gapi-2.0
noinst_DATA = $(ASSEMBLY) $(ASSEMBLY).config
gapi_DATA = $(API)
CLEANFILES = $(ASSEMBLY) generated-stamp generated/*.cs $(API) evolution-sharp.pub
DISTCLEANFILES = $(ASSEMBLY).config AssemblyInfo.cs $(TESTCAL_TARGET) $(TESTBOOK_TARGET) $(TESTCAL_TARGET).mdb $(TESTBOOK_TARGET).mdb $(ASSEMBLY).mdb
sources = \
src/CalComponent.cs \
src/CalGlueComponentUtil.cs \
src/CalGlueRecurrenceUtil.cs \
src/CalRecurrence.cs \
src/CalUtil.cs \
src/GLibUtil.cs
build_sources = $(addprefix $(srcdir)/, $(sources)) AssemblyInfo.cs
customs = \
Book.custom \
Contact.custom \
ContactPhoto.custom \
Cal.custom \
CalView.custom \
Source.custom \
MailRemoteGlueMessageInfo.custom
build_customs = $(addprefix $(srcdir)/, $(customs))
EXTRA_DIST = \
$(ASSEMBLY).config.in \
AssemblyInfo.cs.in \
$(RAW_APIS) \
$(METADATA) \
$(customs) \
$(sources) \
$(TESTBOOK_CSFILES) \
$(TESTCAL_CSFILES)
$(API): $(srcdir)/$(RAW_API) $(srcdir)/$(METADATA)
cp $(srcdir)/$(RAW_API) $(API)
chmod u+w $(API)
$(GAPI_FIXUP) --api=$(API) --metadata=$(srcdir)/$(METADATA)
generated-stamp: $(API) $(build_customs)
rm -f generated/* && \
$(GAPI_CODEGEN) --generate $(API) --outdir=generated --customdir=$(srcdir) --assembly-name=$(ASSEMBLY_NAME) \
&& touch generated-stamp
$(ASSEMBLY): $(build_sources) generated-stamp evolution-sharp.pub
$(CSC) -debug --unsafe /out:$(ASSEMBLY) /target:library $(references) $(build_sources) generated/*.cs
all: $(ASSEMBLY) $(TEST_TARGETS)
install-data-local:
@if test -n '$(TARGET)'; then \
echo "$(GACUTIL) /i $(ASSEMBLY) /f /package $(PACKAGE) /root $(DESTDIR)$(libdir)"; \
$(GACUTIL) /i $(ASSEMBLY) /f /package $(PACKAGE) /root $(DESTDIR)$(libdir) || exit 1; \
fi
uninstall-local:
@if test -n '$(TARGET)'; then \
echo "$(GACUTIL) /u $(ASSEMBLY_NAME) /package $(PACKAGE) /root $(DESTDIR)$(libdir)"; \
$(GACUTIL) /u $(ASSEMBLY_NAME) /package $(PACKAGE) /root $(DESTDIR)$(libdir) || exit 1; \
fi
evolution-sharp.pub: $(top_srcdir)/evolution-sharp.pub
cp $(top_srcdir)/evolution-sharp.pub .
TEST_TARGETS = $(TESTCAL_TARGET) $(TESTBOOK_TARGET)
TESTCAL_TARGET = TestCal.exe
TESTCAL_CSFILES = $(srcdir)/TestCal.cs
$(TESTCAL_TARGET): $(TESTCAL_CSFILES) $(ASSEMBLY)
$(CSC) -debug -out:$@ $(CSFLAGS) $(TESTCAL_CSFILES) -r:$(ASSEMBLY) $(references)
TESTBOOK_TARGET = TestBook.exe
TESTBOOK_CSFILES = $(srcdir)/TestBook.cs
$(TESTBOOK_TARGET): $(TESTBOOK_CSFILES) $(ASSEMBLY)
$(CSC) -debug -out:$@ $(CSFLAGS) $(TESTBOOK_CSFILES) -r:$(ASSEMBLY) $(references)
|