2005-01-09 00:26:45 +00:00
|
|
|
SNK = gtk-sharp.snk
|
|
|
|
API = $(pkg)-api.xml
|
|
|
|
RAW_API = $(pkg)-api.raw
|
|
|
|
|
|
|
|
ASSEMBLY_NAME = $(pkg)-sharp
|
|
|
|
ASSEMBLY = $(ASSEMBLY_NAME).dll
|
|
|
|
|
2005-02-22 10:30:41 +00:00
|
|
|
TARGET = $(pkg:=-sharp.dll) $(pkg:=-sharp.dll.config)
|
2005-01-09 00:26:45 +00:00
|
|
|
noinst_DATA = $(TARGET)
|
2005-02-22 10:30:41 +00:00
|
|
|
TARGET_API = $(pkg:=-api.xml)
|
2005-01-09 00:26:45 +00:00
|
|
|
gapidir = $(datadir)/gapi-2.0
|
|
|
|
gapi_DATA = $(TARGET_API)
|
2005-04-11 14:56:29 +00:00
|
|
|
CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb generated-stamp generated/*.cs $(API) glue/generated.c $(SNK)
|
2005-01-09 00:26:45 +00:00
|
|
|
DISTCLEANFILES = $(ASSEMBLY).config
|
|
|
|
|
|
|
|
EXTRA_DIST = $(RAW_API) $(SYMBOLS) $(ASSEMBLY).config.in $(METADATA) $(customs) $(sources) $(add_dist)
|
|
|
|
|
|
|
|
build_symbols = $(addprefix --symbols=$(srcdir)/, $(SYMBOLS))
|
|
|
|
|
|
|
|
$(API): $(METADATA) $(RAW_API) $(SYMBOLS)
|
|
|
|
cp $(srcdir)/$(RAW_API) $(API)
|
|
|
|
chmod u+w $(API)
|
|
|
|
@if test -n '$(METADATA)'; then \
|
2005-02-22 10:30:41 +00:00
|
|
|
echo "$(RUNTIME) $(top_builddir)/parser/gapi-fixup.exe --api=$(API) --metadata=$(srcdir)/$(METADATA) $(build_symbols)"; \
|
|
|
|
$(RUNTIME) $(top_builddir)/parser/gapi-fixup.exe --api=$(API) --metadata=$(srcdir)/$(METADATA) $(build_symbols); \
|
2005-01-09 00:26:45 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
build_customs = $(addprefix $(srcdir)/, $(customs))
|
|
|
|
api_includes = $(addprefix -I:, $(INCLUDE_API))
|
|
|
|
|
2005-02-22 10:30:41 +00:00
|
|
|
generated-stamp: $(API) $(top_builddir)/generator/gapi_codegen.exe $(build_customs)
|
2005-01-09 00:26:45 +00:00
|
|
|
rm -f generated/* && \
|
2005-02-22 10:30:41 +00:00
|
|
|
$(RUNTIME) $(top_builddir)/generator/gapi_codegen.exe --generate $(API) \
|
2005-01-09 00:26:45 +00:00
|
|
|
$(api_includes) \
|
|
|
|
--outdir=generated --customdir=$(srcdir) --assembly-name=$(ASSEMBLY_NAME) \
|
|
|
|
--gluelib-name=$(pkg)sharpglue --glue-filename=glue/generated.c \
|
|
|
|
&& touch generated-stamp
|
|
|
|
|
|
|
|
$(SNK): $(top_srcdir)/$(SNK)
|
|
|
|
cp $(top_srcdir)/$(SNK) .
|
|
|
|
|
2005-02-22 10:30:41 +00:00
|
|
|
build_sources = $(addprefix $(srcdir)/, $(sources)) $(top_builddir)/AssemblyInfo.cs
|
2005-01-09 00:26:45 +00:00
|
|
|
build_references = $(addprefix /r:, $(references))
|
|
|
|
|
|
|
|
$(ASSEMBLY): generated-stamp $(SNK) $(build_sources) $(references)
|
2005-04-11 14:56:29 +00:00
|
|
|
@rm -f $(ASSEMBLY).mdb
|
|
|
|
$(CSC) $(CSFLAGS) -nowarn:0612 -nowarn:0618 -unsafe -out:$(ASSEMBLY) -target:library $(build_references) $(build_sources) $(GENERATED_SOURCES)
|
2005-01-09 00:26:45 +00:00
|
|
|
|
|
|
|
install-data-local:
|
2005-01-09 03:34:25 +00:00
|
|
|
@if test -n '$(pkg)'; then \
|
2005-01-09 00:26:45 +00:00
|
|
|
echo "$(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS)"; \
|
|
|
|
$(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) || exit 1; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
uninstall-local:
|
2005-01-09 03:34:25 +00:00
|
|
|
@if test -n '$(pkg)'; then \
|
2005-01-09 00:26:45 +00:00
|
|
|
echo "$(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS)"; \
|
|
|
|
$(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS) || exit 1; \
|
|
|
|
fi
|