Remove pygi.h and pygi-private.h
[pygobject.git] / gi / Makefile.am
blob5e73d70769aaf33444ca3d84ee2059b64d333843
1 PLATFORM_VERSION = 3.0
3 SUBDIRS = \
4         repository \
5         overrides \
6         _gobject
8 extension_cppflags = \
9         $(PYTHON_INCLUDES) \
10         -DPY_SSIZE_T_CLEAN
12 extension_ldflags = \
13         -module \
14         -avoid-version \
15         -shrext $(PYTHON_SO)
17 if OS_WIN32
18 # Windows requires Python modules to be explicitly linked to libpython.
19 # Extension modules are shared libaries (.dll), but need to be
20 # called .pyd for Python to load it as an extension module.
21 extension_libadd = \
22         $(PYTHON_LIBS)
24 extension_ldflags += \
25         -no-undefined
26 endif
28 pkgincludedir = $(includedir)/pygobject-$(PLATFORM_VERSION)
29 if WITH_COMMON
30 pkginclude_HEADERS = pygobject.h
31 endif
33 pygidir = $(pyexecdir)/gi
35 pygi_LTLIBRARIES = _gi.la
37 _gi_la_SOURCES = \
38         gobjectmodule.c \
39         pygboxed.c \
40         pygboxed.h \
41         pygenum.c \
42         pygenum.h \
43         pygflags.c \
44         pygflags.h \
45         pyginterface.c \
46         pyginterface.h \
47         pygobject.c \
48         pygobject.h \
49         pygobject-private.h \
50         pygparamspec.c \
51         pygparamspec.h \
52         pygpointer.c \
53         pygpointer.h \
54         pygtype.c \
55         pygtype.h \
56         glibmodule.c \
57         pygoptioncontext.c \
58         pygoptioncontext.h \
59         pygoptiongroup.c \
60         pygoptiongroup.h \
61         pygspawn.c \
62         pygspawn.h \
63         pyglib.c \
64         pyglib.h \
65         pyglib-private.h \
66         pyglib-python-compat.h \
67         gimodule.c \
68         pygi-repository.c \
69         pygi-repository.h \
70         pygi-info.c \
71         pygi-info.h \
72         pygi-foreign.c \
73         pygi-foreign.h \
74         pygi-foreign-api.h \
75         pygi-struct.c \
76         pygi-struct.h \
77         pygi-source.c \
78         pygi-source.h \
79         pygi-argument.c \
80         pygi-argument.h \
81         pygi-resulttuple.c \
82         pygi-resulttuple.h \
83         pygi-type.c \
84         pygi-type.h \
85         pygi-boxed.c \
86         pygi-boxed.h \
87         pygi-closure.c \
88         pygi-closure.h \
89         pygi-ccallback.c \
90         pygi-ccallback.h \
91         pygi-util.h \
92         pygi-property.c \
93         pygi-property.h \
94         pygi-signal-closure.c \
95         pygi-signal-closure.h \
96         pygobject-external.h \
97         pygi-invoke.c \
98         pygi-invoke.h \
99         pygi-invoke-state-struct.h \
100         pygi-cache.h \
101         pygi-cache.c \
102         pygi-marshal-cleanup.c \
103         pygi-marshal-cleanup.h \
104         pygi-basictype.c \
105         pygi-basictype.h \
106         pygi-list.c \
107         pygi-list.h \
108         pygi-array.c \
109         pygi-array.h \
110         pygi-error.c \
111         pygi-error.h \
112         pygi-object.c \
113         pygi-object.h \
114         pygi-value.c \
115         pygi-value.h \
116         pygi-enum-marshal.c \
117         pygi-enum-marshal.h \
118         pygi-struct-marshal.c \
119         pygi-struct-marshal.h \
120         pygi-hashtable.c \
121         pygi-hashtable.h
122 _gi_la_CFLAGS = \
123         $(extension_cppflags) \
124         $(GLIB_CFLAGS) \
125         $(GI_CFLAGS)
126 _gi_la_CPPFLAGS = \
127         $(extension_cppflags)
128 _gi_la_LIBADD = \
129         $(extension_libadd) \
130         $(GLIB_LIBS) \
131         $(GI_LIBS) \
132         $(FFI_LIBS)
133 _gi_la_LDFLAGS = \
134         $(extension_ldflags) \
135         -export-symbols-regex "init_gi|PyInit__gi"
137 if ENABLE_CAIRO
138 pygi_LTLIBRARIES += _gi_cairo.la
139 endif
141 _gi_cairo_la_SOURCES = \
142         pygi-foreign-cairo.c
143 _gi_cairo_la_CFLAGS = \
144         $(GI_CFLAGS) \
145         $(CAIRO_CFLAGS) \
146         $(PYCAIRO_CFLAGS)
147 _gi_cairo_la_CPPFLAGS = \
148         $(extension_cppflags)
149 _gi_cairo_la_LIBADD = \
150         $(extension_libadd) \
151         $(GI_LIBS) \
152         $(CAIRO_LIBS) \
153         $(PYCAIRO_LIBS)
154 _gi_cairo_la_LDFLAGS = \
155         $(extension_ldflags) \
156         -export-symbols-regex "init_gi_cairo|PyInit__gi_cairo"
159 # This is to ensure we have a symlink to the .so in the
160 # build directory, which the Python interpreter can load
161 # directly without having to know how to parse .la files.
162 %$(PYTHON_SO): %.la
163         $(LN_S) -f .libs/$@ $@
165 all-local: $(LTLIBRARIES:.la=$(PYTHON_SO))
167 check-local: $(LTLIBRARIES:.la=$(PYTHON_SO))
168 clean-local:
169         rm -f $(LTLIBRARIES:.la=$(PYTHON_SO))