[c68057]: gtkextra / Makefile.mingw Maximize Restore History

Download this file

Makefile.mingw    184 lines (143 with data), 6.0 kB

  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
###########################################################################
#
# Makefile for MinGW environment (native win32 no cygwin dll dependencies).
#
# Requires:
# - MinGW and MSYS
# Binaries at: http://www.mingw.org (mingw-get-inst-20101030.exe)
#
# - gtk+-bundle_2.22.1-20101227_win32.zip
# Binaries at: http://www.gtk.org/download-windows.html
#
###########################################################################
# Build Instructions:
# - build the gtkextra package from source on unix/linux
# - in a MinGW shell, type:
# cd ./gtkextra
# make -f Makefile.mingw
# make -f Makefile.mingw install
###########################################################################
#
# User variables, change for your local system
#
# comment out for no debugging
#APP_DEBUG = true
# Put the path to where your gtk libraries are kept
GTK_PATH = c:/mingw
LIBDIR = .libs_mingw
################## Try not to edit ############################
module = gtkextra
target = win32
version = 3.0
#
# compiler definitions
#
CC = gcc
CFLAGS += -DMinGW -DHAVE_CONFIG_H -I..
CFLAGS += `pkg-config --cflags gtk+-2.0 gmodule-2.0`
GTK_LIBS = `pkg-config --libs gtk+-2.0 gmodule-2.0`
WIN_LIBS = -lm -luser32 -ladvapi32 -lwsock32
ifdef APP_DEBUG
CFLAGS += -g -Wall
LFLAGS += -g
else
CFLAGS += -O2
endif
EXEEXT = .exe
OBJEXT = .o
#
# standard vars, install directories
#
prefix = $(GTK_PATH)
datarootdir = $(prefix)/share
datadir = $(datarootdir)
infodir = $(datarootdir)/info
includedir = $(prefix)/include
exec_prefix = $(prefix)
bindir = $(exec_prefix)/bin
libexecdir = $(exec_prefix)/libexec
libdir = $(exec_prefix)/lib
libpkgconfdir = $(libdir)/pkgconfig
IDIR_INCLUDE = $(includedir)/$(module)-$(version)
#
# Various targets to build.
#
BASE_NAME = lib$(module)-$(target)-$(version)
STATIC_LIB = $(LIBDIR)/$(BASE_NAME).a
DLL_LIB = $(LIBDIR)/$(BASE_NAME).dll
DLL_EXP_LIB = $(LIBDIR)/$(BASE_NAME).dll.a
#DLL_EXP_DEF = $(LIBDIR)/gtkextra.def
#
# sources, testapps (copy this from Makefile)
#
GTKEXTRA_LOs = \
gtkbordercombo.lo gtkcharsel.lo gtkcheckitem.lo \
gtkcolorcombo.lo gtkcombobutton.lo gtkdataentry.lo gtkdataformat.lo gtkdirtree.lo \
gtkextra.lo gtkextra-marshal.lo gtkextratypebuiltins.lo gtkfilelist.lo \
gtkfontcombo.lo gtkiconlist.lo gtkitementry.lo \
gtkiconfilesel.lo gtkplot.lo gtkplotarray.lo gtkplot3d.lo \
gtkplotdt.lo gtkplotpolar.lo gtkplotdata.lo gtkplotpixmap.lo \
gtkplotbar.lo gtkplotbox.lo gtkplotbubble.lo gtkplotcandle.lo \
gtkplotflux.lo gtkplotsurface.lo gtkplotcsurface.lo \
gtkplotcairo.lo gtkplotcanvas.lo gtkplotpc.lo gtkplotgdk.lo \
gtkplotps.lo gtkplotprint.lo gtkplotsegment.lo gtkpsfont.lo \
gtksheet.lo gtksheetcolumn.lo gtktogglecombo.lo gtkplotcanvasline.lo \
gtkplotcanvasrectangle.lo gtkplotcanvasellipse.lo \
gtkplotcanvastext.lo gtkplotcanvaspixmap.lo \
gtkplotcanvasplot.lo
TESTAPPS = \
testgtksheet$(EXEEXT) #testgtkiconlist$(EXEEXT) \
# testgtkfilesel$(EXEEXT) testgtkplot$(EXEEXT) \
# testgtkfont$(EXEEXT) testgtkplotcanvas$(EXEEXT) \
# testrealtime$(EXEEXT) testiterator$(EXEEXT) testpolar$(EXEEXT) \
# testgtkplot3d$(EXEEXT) testcontour$(EXEEXT) \
# testbubbles$(EXEEXT) testflux$(EXEEXT) testboxes$(EXEEXT) \
# testcandles$(EXEEXT) testimage$(EXEEXT) testpixmap$(EXEEXT) \
# testcharsel$(EXEEXT) testdt$(EXEEXT) testgtkplotdt$(EXEEXT) \
# testsegment$(EXEEXT)
#
# setup source file variables
#
gtkextra_public_h_sources = \
gtkbordercombo.h gtkcharsel.h gtkcheckitem.h gtkcolorcombo.h \
gtkcombobutton.h gtkdataentry.h gtkdataformat.h gtkdirtree.h gtkextra.h gtkextrafeatures.h \
gtkextraicons.h gtkextra-marshal.h gtkextratypebuiltins.h \
gtkfilelist.h gtkfileicons.h gtkfontcombo.h gtkiconfilesel.h gtkiconlist.h \
gtkitementry.h gtkplot.h gtkplotarray.h gtkplot3d.h gtkplotdt.h gtkplotpolar.h \
gtkplotdata.h gtkplotpixmap.h gtkplotbar.h gtkplotbox.h gtkplotbubble.h \
gtkplotcandle.h gtkplotflux.h gtkplotsurface.h gtkplotcairo.h gtkplotcanvas.h \
gtkplotcsurface.h gtkplotpc.h gtkplotgdk.h gtkplotps.h gtkplotprint.h \
gtkplotsegment.h gtkpsfont.h gtksheet.h gtksheetcolumn.h gtktogglecombo.h \
gtkplotcanvasline.h gtkplotcanvasrectangle.h gtkplotcanvasellipse.h \
gtkplotcanvastext.h gtkplotcanvaspixmap.h gtkplotcanvasplot.h
gtkextra_mingw_pkgconf_file = \
../$(module)-$(version).pc.mingw
GTKEXTRA_SRCS = $(GTKEXTRA_LOs:.lo=.c)
GTKEXTRA_OBJS = $(GTKEXTRA_SRCS:.c=$(OBJEXT))
DLL_SRCS = $(GTKEXTRA_SRCS)
DLL_OBJS = $(GTKEXTRA_SRCS:%.c=$(LIBDIR)/%$(OBJEXT))
TESTEXE = $(TESTAPPS:%=$(LIBDIR)/%)
all: $(LIBDIR) $(STATIC_LIB) $(DLL_LIB) $(TESTEXE)
$(LIBDIR):
$(shell mkdir $(LIBDIR))
static: $(STATIC_LIB)
dll: $(DLL_LIB)
$(STATIC_LIB): $(DLL_OBJS)
ar rc $@ $^
$(DLL_LIB): $(DLL_OBJS)
$(CC) --shared $(DLL_OBJS) $(GTK_LIBS) $(WIN_LIBS) -o$@ -Wl,--out-implib,$(DLL_EXP_LIB)
$(LIBDIR)/%$(EXEEXT): %.c
$(CC) $(CFLAGS) -o $@ $*.c $(DLL_LIB) $(GTK_LIBS) $(WIN_LIBS)
$(LIBDIR)/%$(OBJEXT): %.c
$(CC) $(CFLAGS) $(INC) -o $@ -c $*.c
install: $(gtkextra_public_h_sources) $(IDIR_INCLUDE) $(IDIR_INCLUDE)/$(module) $(STATIC_LIB) $(DLL_LIB) $(DLL_EXP_LIB) $(gtkextra_mingw_pkgconf_file)
install $(gtkextra_public_h_sources) $(IDIR_INCLUDE)/$(module)/
install $(STATIC_LIB) $(DLL_EXP_LIB) $(libdir)/
install $(DLL_LIB) $(bindir)/
install $(gtkextra_mingw_pkgconf_file) $(libpkgconfdir)/$(module)-$(version).pc
$(IDIR_INCLUDE):
$(shell mkdir $(IDIR_INCLUDE))
$(IDIR_INCLUDE)/$(module):
$(shell mkdir $(IDIR_INCLUDE)/$(module))
clean:
rm -f $(DLL_OBJS) $(STATIC_LIB) $(DLL_LIB) $(DLL_EXP_LIB) $(TESTEXE)