File: Makefile

package info (click to toggle)
gdata-sharp 1.4.0.2-4
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 7,572 kB
  • ctags: 7,942
  • sloc: cs: 58,233; makefile: 165; python: 163; xml: 77; sh: 27
file content (182 lines) | stat: -rw-r--r-- 8,193 bytes parent folder | download
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
CSC1=mcs
CSC=gmcs

DEFINES=/d:TRACE

VERSION=$(shell egrep AssemblyVersion version/AssemblyVersion.cs | egrep -o \([[:digit:]]\.\)+[[:digit:]]+)
PREFIX=/usr/local

CORELIBS=\
	Google.GData.Client.dll		\
	Google.GData.Extensions.dll 	

ACLLIBS=\
	Google.GData.Client.dll		\
	Google.GData.Extensions.dll 	\
	Google.GData.AccessControl.dll


ALLLIBS = \
	Google.GData.Calendar.dll	\
	Google.GData.Client.dll		\
	Google.GData.CodeSearch.dll	\
	Google.GData.Extensions.dll	\
	Google.GData.GoogleBase.dll	\
	Google.GData.Spreadsheets.dll	\
	Google.GData.Apps.dll		\
	Google.GData.Photos.dll		\
	Google.GData.Documents.dll 	\
	Google.GData.AccessControl.dll 	\
	Google.GData.Contacts.dll	\
	Google.GData.YouTube.dll	\
	Google.GData.Health.dll \
	Google.GData.Blogger.dll \

FRAMEWORK_REFS = -r:System.dll -r:System.Xml.dll -r:System.Web.dll -r:System.Configuration.dll

PKGCONFIG_FILES = $(patsubst %.pc.in,%.pc,$(wildcard misc/*.pc.in))

COREREFS = $(addprefix -r:,$(CORELIBS)) $(FRAMEWORK_REFS) 
ALLREFS = $(addprefix -r:,$(ALLLIBS)) $(FRAMEWORK_REFS)
ACLREFS = $(addprefix -r:,$(ACLLIBS)) $(FRAMEWORK_REFS)


samples =	\
	gbase_queryexample.exe 		\
	gbase_customertool.exe		\
	execrequest.exe			\
	gapps_appsdemo.exe \
	gapps_migration_sample.exe \
	gblogger_demo.exe \
	gcal_demo.exe \
	gspreadsheet_demo.exe \
	PhotoTool.exe \
	HealthTool.exe \

all: $(ALLLIBS) tests $(samples) $(PKGCONFIG_FILES)

core_sources = $(wildcard src/core/*.cs) $(wildcard version/*.cs)
extensions_sources = $(wildcard src/extensions/*.cs) $(wildcard version/*.cs)
gbase_sources = $(wildcard src/gbase/*.cs) $(wildcard version/*.cs)
gcodesearch_sources = $(wildcard src/gcodesearch/*.cs) $(wildcard version/*.cs)
gspreadsheet_sources = $(wildcard src/gspreadsheet/*.cs) $(wildcard version/*.cs)
gcalendar_sources =  $(wildcard src/gcalendar/*.cs) $(wildcard version/*.cs)
gacl_sources = $(wildcard src/gacl/*.cs) $(wildcard version/*.cs)
gapps_sources = $(wildcard src/gapps/*.cs) $(wildcard version/*.cs)
gphotos_sources = $(wildcard src/gphotos/*.cs) $(wildcard version/*.cs)
gdocuments_sources = $(wildcard src/gdocuments/*.cs) $(wildcard version/*.cs)
gcontact_sources = $(wildcard src/gcontacts/*.cs) $(wildcard version/*.cs)
youtube_sources = $(wildcard src/youtube/*.cs) $(wildcard version/*.cs)
health_sources = $(wildcard src/ghealth/*.cs) $(wildcard version/*.cs)
blogger_sources = $(wildcard src/blogger/*.cs) $(wildcard version/*.cs)
test_sources = $(wildcard src/unittests/*.cs) $(wildcard src/unittests/gbase/*.cs) $(wildcard src/unittests/gapps/*.cs)\
				 $(wildcard src/unittests/spreadsheets/*.cs) $(wildcard src/unittests/youtube/*.cs)  $(wildcard src/version/*cs)\
				 $(wildcard src/unittests/core/*.cs)  $(wildcard src/unittests/picasa/*.cs)

Google.GData.Client.dll: $(core_sources) src/core/clientkey.sn
	$(CSC) $(DEFINES) -target:library -out:$@ $(core_sources) $(FRAMEWORK_REFS) -keyfile:src/core/clientkey.sn

Google.GData.Extensions.dll: Google.GData.Client.dll $(extension_sources) src/extensions/extensionkey.sn
	$(CSC) $(DEFINES) -target:library -out:$@ -r:Google.GData.Client.dll $(extensions_sources) $(FRAMEWORK_REFS) -keyfile:src/extensions/extensionkey.sn

Google.GData.Calendar.dll: $(ACLLIBS) $(gcalendar_sources) src/gcalendar/calendarkey.sn
	$(CSC) -target:library -out:$@ $(ACLREFS) $(gcalendar_sources) -keyfile:src/gcalendar/calendarkey.sn

Google.GData.CodeSearch.dll: $(CORELIBS) $(gcodesearch_sources) src/gcodesearch/codesearch.sn
	$(CSC) -target:library -out:$@ $(COREREFS) $(gcodesearch_sources) -keyfile:src/gcodesearch/codesearch.sn

Google.GData.GoogleBase.dll: $(CORELIBS) $(gbase_sources) src/gbase/gbase.sn
	$(CSC) -target:library -out:$@ $(COREREFS) $(gbase_sources) -keyfile:src/gbase/gbase.sn

Google.GData.Spreadsheets.dll: $(CORELIBS) $(gspreadsheet_sources) src/gspreadsheet/spreadsheets.sn
	$(CSC) -target:library -out:$@ $(COREREFS) $(gspreadsheet_sources) -keyfile:src/gspreadsheet/spreadsheets.sn

Google.GData.AccessControl.dll: $(CORELIBS) $(gacl_sources) src/gacl/gacl.sn
	$(CSC) -target:library -out:$@ $(COREREFS) $(gacl_sources) -keyfile:src/gacl/gacl.sn

Google.GData.Apps.dll: $(CORELIBS) $(gapps_sources) src/gapps/gapps.sn
	$(CSC) -target:library -out:$@ $(COREREFS) $(gapps_sources) -keyfile:src/gapps/gapps.sn

Google.GData.Photos.dll: $(CORELIBS) $(gphotos_sources) src/gphotos/picasa.sn
	$(CSC) $(DEFINES) -target:library -out:$@ $(COREREFS) $(gphotos_sources) -keyfile:src/gphotos/picasa.sn

Google.GData.Documents.dll: $(ACLLIBS) $(gdocuments_sources) src/gdocuments/documents.sn
	$(CSC) $(DEFINES) -target:library -out:$@ $(ACLREFS) $(gdocuments_sources) -keyfile:src/gdocuments/documents.sn

Google.GData.Contacts.dll: $(CORELIBS) $(gcontact_sources) src/gcontacts/contacts.sn
	$(CSC) $(DEFINES) -target:library -out:$@ $(COREREFS) $(gcontact_sources) -keyfile:src/gcontacts/contacts.sn

Google.GData.YouTube.dll: $(CORELIBS) $(youtube_sources) src/youtube/youtube.sn
	$(CSC) $(DEFINES) -target:library -out:$@ $(COREREFS) $(youtube_sources) -keyfile:src/youtube/youtube.sn

Google.GData.Health.dll: $(CORELIBS) $(health_sources) src/ghealth/ghealth.sn
	$(CSC) $(DEFINES) -target:library -out:$@ $(COREREFS) $(health_sources) -keyfile:src/ghealth/ghealth.sn

Google.GData.Blogger.dll: $(CORELIBS) $(blogger_sources) src/blogger/blogger.sn
	$(CSC) $(DEFINES) -target:library -out:$@ $(COREREFS) $(blogger_sources) -keyfile:src/blogger/blogger.sn

clean:
	-rm *.sn *.dll *exe $(PKGCONFIG_FILES)

install: all
	for i in $(ALLLIBS); do gacutil -i $$i -package GData-Sharp -root "$(DESTDIR)$(PREFIX)/lib"; done
	install -d "$(DESTDIR)$(PREFIX)/lib/pkgconfig"
	install -m 644 -t "$(DESTDIR)$(PREFIX)/lib/pkgconfig" $(PKGCONFIG_FILES) 

uninstall:
	for i in $(ALLLIBS); do gacutil -u $$i -package GData-Sharp -root "$(DESTDIR)$(PREFIX)/lib"; done
	for i in $(PKGCONFIG_FILES) ; do rm "$(DESTDIR)$(PREFIX)/lib/pkgconfig/$$i" ; done

tests: $(ALLLIBS)
	$(CSC) $(DEFINES) -target:library -out:unittests.dll $(ALLREFS) -r:nunit.framework.dll $(test_sources)

gbase_customertool_sources = samples/gbase/example.cs \
	samples/gbase/customertool.cs	\
	samples/gbase/commands.cs

gbase_customertool.exe: $(ALLLIBS) $(gbase_customertool_sources)
	$(CSC) -out:$@ $(ALLREFS) $(gbase_customertool_sources)

gbase_queryexample_sources = samples/gbase/example.cs samples/gbase/queryexample.cs
gbase_queryexample.exe: $(ALLLIBS) $(gbase_queryexample_sources)
	$(CSC) -out:$@ $(ALLREFS) $(gbase_queryexample_sources)

gapps_sample_sources = samples/appsforyourdomain/appsdemo.cs
gapps_appsdemo.exe: $(ALLLIBS) $(gapps_sample_sources)
	$(CSC) -out:$@ $(ALLREFS) $(gapps_sample_sources)

gapps_migration_sample_sources = samples/appsforyourdomain/migration/migrationsample.cs
gapps_migration_sample.exe: $(ALLLIBS) $(gapps_migration_sample_sources)
	$(CSC) -out:$@ $(ALLREFS) $(gapps_migration_sample_sources)

execrequest_sources = $(wildcard samples/execrequest/*.cs)
execrequest.exe: $(ALLLIBS) $(execrequest_sources)
	$(CSC) -out:$@ $(ALLREFS) $(execrequest_sources)

gblogger_sample_sources = samples/blogger/ConsoleSample.cs
gblogger_demo.exe: $(ALLLIBS) $(gblogger_sample_sources)
	$(CSC) -out:$@ $(ALLREFS) $(gblogger_sample_sources)

gcal_demo_sources = samples/calendar/console/CalendarDemo.cs
gcal_demo.exe: $(ALLLIBS) $(gcal_demo_sources)
	$(CSC) -out:$@ $(ALLREFS) $(gcal_demo_sources)

gspreadsheet_demo_sources = samples/spreadsheets/spreadsheetdemo.cs
gspreadsheet_demo.exe: $(ALLLIBS) $(gspreadsheet_demo_sources)
	$(CSC) -out:$@ $(ALLREFS) $(gspreadsheet_demo_sources)

PhotoTool_sources = $(wildcard samples/PhotoBrowser/*.cs)
PhotoTool.exe: $(ALLLIBS) $(PhotoTool_sources)
	$(CSC) -out:$@ $(ALLREFS) -r:System.Windows.Forms -r:System.Drawing -r:System.Data $(PhotoTool_sources)
	
healthtool_sources = $(wildcard samples/health/*.cs)
HealthTool.exe: $(ALLLIBS) $(healthtool_sources)
	$(CSC) -out:$@ $(ALLREFS) $(healthtool_sources)



test:
	nunit-console2 unittests.dll

%.pc : %.pc.in
	sed "s,\@VERSION\@,$(VERSION),g; s,\@prefix\@,$(PREFIX),g" < $< > $@