aboutsummaryrefslogtreecommitdiffstats
path: root/libical/src/libical/Makefile.am
blob: a3b61d56778a31ea31fd33ac0cc3e2fc35e1ffe4 (plain) (blame)
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
183
184
185
186
187
188
189
190
191
DESIGNDATA = $(top_srcdir)/design-data
ICALSCRIPTS = $(top_srcdir)/scripts

lib_LTLIBRARIES = libical.la

noinst_LTLIBRARIES = libical-static.la
libical_static_la_SOURCES = $(libical_la_SOURCES)
libical_static_la_LDFLAGS = --all-static

YFLAGS = -d -v -t -pical_yy
LFLAGS = -Pical_yy
LEX_OUTPUT_ROOT = lex.ical_yy

INCLUDES =          \
    -I$(top_builddir)   \
    -I$(top_srcdir)/src \
    -I$(top_builddir)/src   \
    -I$(srcdir)

libical_la_LDFLAGS = -version-info 0:0:0

icalcomponent.c: icalproperty.h icalvalue.h icalparameter.h

libical_la_SOURCES =        \
    icalcomponent.c     \
    icalcomponent.h     \
    icalenums.c     \
    icalenums.h     \
    icalerror.c     \
    icalerror.h     \
    icallexer.l     \
    icalmemory.c        \
    icalmemory.h        \
    icalmime.c      \
    icalmime.h      \
    icalparameter.c     \
    icalparameter.h     \
    icalparser.c        \
    icalparser.h        \
    icalproperty.c      \
    icalproperty.h      \
    icalrecur.c     \
    icalrecur.h     \
    icalrestriction.c   \
    icalrestriction.h   \
    icaltime.c      \
    icaltime.h      \
    icaltypes.c     \
    icaltypes.h     \
    icalvalue.c     \
    icalvalue.h     \
    icalyacc.h      \
    icalyacc.y      \
    pvl.c           \
    pvl.h           \
    sspm.c          \
    sspm.h          \
    vsnprintf.c

libicalincludedir = $(includedir)

libicalinclude_HEADERS =  ical.h 

# ORDERING OF HEADERS IS SIGNIFICANT. Don't change this ordering. It
# is required to make the combined header ical.h properly
COMBINEDHEADERS =           \
    icalversion.h           \
    $(srcdir)/icaltime.h        \
    $(srcdir)/icalenums.h       \
    $(srcdir)/icaltypes.h       \
    $(srcdir)/icalrecur.h       \
    icalvalue.h         \
    icalparameter.h         \
    icalproperty.h          \
    $(srcdir)/pvl.h         \
    $(srcdir)/icalcomponent.h   \
    $(srcdir)/icalparser.h      \
    $(srcdir)/icalmemory.h      \
    $(srcdir)/icalerror.h       \
    $(srcdir)/icalrestriction.h \
    $(srcdir)/sspm.h        \
    $(srcdir)/icalmime.h

BUILT_SOURCES =         \
    ical.h          \
    icalparameter.c     \
    icalparameter.h     \
    icalproperty.c      \
    icalproperty.h      \
    icalrestriction.c   \
    icalvalue.c     \
    icalvalue.h

ical.h: $(COMBINEDHEADERS)
    cat $(COMBINEDHEADERS)              \
    | egrep -v "#include.*\"ical"           \
    | egrep -v "#include.*\"pvl\.h\"" > ical.h

icallexer.c : icalyacc.h


# parameters

PARAMETERDEPS = \
    $(ICALSCRIPTS)/mkderivedparameters.pl \
    $(DESIGNDATA)/param-c-types.txt \
    icalparameter.c.in \
    icalparameter.h.in

icalparameter.h: $(PARAMETERDEPS) 
    $(PERL) $(ICALSCRIPTS)/mkderivedparameters.pl -i $(srcdir)/icalparameter.h.in -h $(DESIGNDATA)/param-c-types.txt > icalparameter.newh \
    && mv icalparameter.newh icalparameter.h 

icalparameter.c: $(PARAMETERDEPS) icalparameter.h
    $(PERL) $(ICALSCRIPTS)/mkderivedparameters.pl -i $(srcdir)/icalparameter.c.in -c $(DESIGNDATA)/param-c-types.txt > icalparameter.newc \
    && mv icalparameter.newc icalparameter.c

# properties

PROPERTYDEPS =                  \
    $(ICALSCRIPTS)/mkderivedproperties.pl   \
    $(DESIGNDATA)/prop-to-value.txt     \
    $(DESIGNDATA)/value-c-types.txt     \
    icalproperty.c.in           \
    icalproperty.h.in


icalproperty.h: $(PROPERTYDEPS)
    $(PERL) $(ICALSCRIPTS)/mkderivedproperties.pl -i $(srcdir)/icalproperty.h.in -h \
        $(DESIGNDATA)/prop-to-value.txt \
        ${DESIGNDATA}/value-c-types.txt > icalproperty.h 

icalproperty.c: $(PROPERTYDEPS) icalproperty.h 
    $(PERL) $(ICALSCRIPTS)/mkderivedproperties.pl -i $(srcdir)/icalproperty.c.in -c \
        $(DESIGNDATA)/prop-to-value.txt \
        ${DESIGNDATA}/value-c-types.txt > icalproperty.c

# restrictions

RESTRICTIONDEPS =               \
    $(ICALSCRIPTS)/mkrestrictiontable.pl    \
    $(DESIGNDATA)/restrictions.csv      \
    icalrestriction.c.in

icalrestriction.c: $(RESTRICTIONDEPS)
    $(PERL) $(ICALSCRIPTS)/mkrestrictiontable.pl  -i $(srcdir)/icalrestriction.c.in \
        $(DESIGNDATA)/restrictions.csv > icalrestriction.c

# values

VALUEDEPS =                 \
    $(ICALSCRIPTS)/mkderivedvalues.pl   \
    $(DESIGNDATA)/value-c-types.txt     \
    icalvalue.c.in              \
    icalvalue.h.in

icalvalue.h: $(VALUEDEPS)
    $(PERL) $(ICALSCRIPTS)/mkderivedvalues.pl -i $(srcdir)/icalvalue.h.in -h \
        $(DESIGNDATA)/value-c-types.txt > icalvalue.h

icalvalue.c: $(VALUEDEPS) icalvalue.h
    $(PERL) $(ICALSCRIPTS)/mkderivedvalues.pl  -i $(srcdir)/icalvalue.c.in -c \
        $(DESIGNDATA)/value-c-types.txt > icalvalue.c



# housekeeping
CONFIG_CLEAN_FILES = y.output

CLEANFILES =            \
    icalparameter.h     \
    icalparameter.c     \
    icalproperty.h      \
    icalproperty.c      \
    icalrestriction.c   \
    icalvalue.h     \
    icalvalue.c

EXTRA_DIST =            \
    icalparameter.c.in  \
    icalparameter.h.in  \
    icalproperty.c.in   \
    icalproperty.h.in   \
    icalrestriction.c.in    \
    icalvalue.c.in      \
    icalvalue.h.in      \
    icalversion.h.in    \
    $(BUILT_SOURCES)    \
    icallexer.c     \
    icalyacc.c