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 192 193 194 195 196 197
|
TOP = ..\..
PRJ_TOP = ..
PACKAGE = libdia
!INCLUDE $(PRJ_TOP)\dia-make.msc
INCLUDES = \
-FImsvc_recommended_pragmas.h \
-I. -I.. \
$(GTK2_CFLAGS) \
$(LIBXML2_CFLAGS) \
$(ZLIB_CFLAGS) \
!IFDEF USEFT2
-DHAVE_FREETYPE $(FREETYPE2_CFLAGS) \
!ENDIF
DEFINES = \
-DHAVE_CONFIG_H \
-DG_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED \
-DLIBDIA_COMPILATION
# in GTK_CFLAGS: $(GLIB_CFLAGS)
PKG_LINK = $(GTK2_LIBS) $(PANGOWIN32_LIBS) $(GLIB_LIBS) \
$(PANGOCAIRO_LIBS) \
!IFDEF USEFT2
$(PANGOFT2_LIBS) \
!ENDIF
$(LIBXML2_LIBS) $(ZLIB_LIBS) \
$(GDK_PIXBUF_LIBS) $(CAIRO_LIBS) \
$(INTL_LIBS)
ICON_PNG_PAIRS = \
dia_broken_icon pixmaps\broken.png \
dia_broken_chain_icon pixmaps\broken-chain.png \
dia_unbroken_chain_icon pixmaps\unbroken-chain.png \
stdpath_icon pixmaps\standard-path.png
# Note that this doesn't seem to get run automatically. It should, but
# I'm not gonna chase goblins right now.
dia-lib-icons.h:
gdk-pixbuf-csource --build-list \
$(ICON_PNG_PAIRS) > dia-lib-icons.h || del dia-lib-icons.h
OBJECTS = \
autoroute.obj \
arrows.obj \
attributes.obj \
bezier-common.obj \
bezier_conn.obj \
beziershape.obj \
boundingbox.obj \
color.obj \
connection.obj \
connectionpoint.obj \
connpoint_line.obj \
create.obj \
debug.obj \
diaarrowchooser.obj \
diaarrowselector.obj \
diacellrendererenum.obj \
diacolorselector.obj \
diacontext.obj \
dialinechooser.obj \
dialinestyleselector.obj \
dialogs.obj \
diatransform.obj \
dia_dirs.obj \
dia_image.obj \
dia_svg.obj \
dia_xml.obj \
diaerror.obj \
diagramdata.obj \
diagdkrenderer.obj \
diaimportrenderer.obj \
diainteractiverenderer.obj \
diarenderer.obj \
diapathrenderer.obj \
diapatternselector.obj \
diatransformrenderer.obj \
diasvgrenderer.obj \
dynamic_obj.obj \
element.obj \
filter.obj \
focus.obj \
font.obj \
geometry.obj \
group.obj \
intl.obj \
dialib.obj \
layer.obj \
message.obj \
objchange.obj \
object.obj \
object-alias.obj \
object_defaults.obj \
orth_conn.obj \
paper.obj \
parent.obj \
path-math.obj \
pattern.obj \
persistence.obj \
plug-ins.obj \
poly_conn.obj \
polyshape.obj \
prefs.obj \
prop_attr.obj \
prop_basic.obj \
prop_dict.obj \
prop_geomtypes.obj \
prop_inttypes.obj \
prop_matrix.obj \
prop_pattern.obj \
prop_pixbuf.obj \
prop_sdarray.obj \
prop_sdarray_widget.obj \
prop_text.obj \
prop_widgets.obj \
propdesc.obj \
propdialogs.obj \
properties.obj \
proplist.obj \
propobject.obj \
propoffsets.obj \
propregistry.obj \
render_pixmap.obj \
sheet.obj \
standard-path.obj \
text.obj \
textline.obj \
units.obj \
utils.obj \
widgets.obj \
diaoptionmenu.obj \
diadynamicmenu.obj \
diafontselector.obj \
\
diacellrendererproperty.obj \
\
diamarshal.obj \
#
# rules to generate built sources
#
# setup autogeneration dependancies
gen_sources = xgen-gwmh xgen-gwmc
CLEANFILES = $(gen_sources)
!IFNDEF GLIB_GEN_MARSHAL
GLIB_GEN_MARSHAL=$(TOP)\glib\gobject\glib-genmarshal
!ENDIF
diamarshal.h: diamarshal.list
$(GLIB_GEN_MARSHAL) --prefix=dia_marshal diamarshal.list --header >> xgen-gwmh \
&& copy /y xgen-gwmh diamarshal.h \
&& del xgen-gwmh xgen-gwmh~
diamarshal.c: diamarshal.h
echo #include "diamarshal.h" >> xgen-gwmc \
&& $(GLIB_GEN_MARSHAL) --prefix=dia_marshal diamarshal.list --body >> xgen-gwmc \
&& copy xgen-gwmc diamarshal.c \
&& del xgen-gwmc xgen-gwmc~
# No general LDFLAGS needed
INSTALL = copy
## targets
all : \
$(PRJ_TOP)\config.h \
dia-lib-icons.h \
diamarshal.c \
$(PACKAGE).dll
$(PACKAGE).lib : $(OBJECTS)
lib /out:$(PACKAGE).lib $(OBJECTS)
$(PACKAGE).dll : $(OBJECTS) $(PACKAGE).def
$(CC) $(CFLAGS) -LD -Fe$(PACKAGE).dll $(OBJECTS) \
$(LDFLAGS) $(PKG_LINK) user32.lib advapi32.lib wsock32.lib /def:$(PACKAGE).def
$(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32
copy $(PRJ_TOP)\config.h.win32 $(PRJ_TOP)\config.h
font-height.exe : font-height.obj
$(CC) $(CFLAGS) -Fe$@ font-height.obj \
$(PKG_LINK) $(LDFLAGS) gdi32.lib user32.lib $(LDFLAGS) /subsystem:console
splint :
sp -weak -fcnuse $(CFLAGS) proplist.c >sp.log
!IFDEF SCA
#sca : $(OBJECTS)
# clang -analyze $(INCLUDES) $(DEFINES)
# Not using $(CFLAGS) for msvc either
.c.obj :
clang --analyze $(INCLUDES) $(DEFINES) $(PKG_CFLAGS) $<
!ENDIF
|