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

Download this file

147 lines (107 with data), 3.6 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
###########################################################################
#
# 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 ./glade
# 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
GLADE_PATH = $(GTK_PATH)
LIBDIR = .libs_mingw
################## Try not to edit ############################
SUBDIRS = pixmaps
glademoduledir = `pkg-config --variable=moduledir gladeui-1.0`
gladecatalogdir = `pkg-config --variable=catalogdir gladeui-1.0`
gladepixmapdir = `pkg-config --variable=pixmapdir gladeui-1.0`
libgladegtkextra = libgladegtkextra.la
gladegtkextracatalog = gtk+extra-catalog.xml
#
# compiler definitions
#
CC = gcc
CFLAGS += -DMinGW -DHAVE_CONFIG_H -I..
CFLAGS += -DGETTEXT_PACKAGE=\"gtkextra\"
CFLAGS += `pkg-config --cflags gladeui-1.0 gtkextra-3.0`
GTK_LIBS = `pkg-config --libs gladeui-1.0 gtkextra-3.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 = $(GLADE_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 = libgladegtkextra
STATIC_LIB = $(LIBDIR)/$(BASE_NAME).a
DLL_LIB = $(LIBDIR)/$(BASE_NAME).dll
DLL_EXP_LIB = $(LIBDIR)/$(BASE_NAME).dll.a
UNIX_LIB_NAME = $(BASE_NAME).so
MINGW_LIB_NAME = $(BASE_NAME).dll
MINGW_CATALOG_FILE = $(LIBDIR)/$(gladegtkextracatalog)
#
# sources, testapps (copy this from Makefile)
#
LIBGLADEGTKEXTRA_LOs = \
glade-gtksheet-editor.lo
LIBGLADEGTKEXTRA_SRCS = $(LIBGLADEGTKEXTRA_LOs:.lo=.c)
LIBGLADEGTKEXTRA_OBJS = $(LIBGLADEGTKEXTRA_SRCS:.c=$(OBJEXT))
DLL_SRCS = $(LIBGLADEGTKEXTRA_SRCS)
DLL_OBJS = $(LIBGLADEGTKEXTRA_SRCS:%.c=$(LIBDIR)/%$(OBJEXT))
TESTEXE = $(TESTAPPS:%=$(LIBDIR)/%)
all: $(LIBDIR) $(DLL_LIB) $(TESTEXE) $(MINGW_CATALOG_FILE)
$(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
$(MINGW_CATALOG_FILE): $(gladegtkextracatalog)
sed s/$(UNIX_LIB_NAME)/$(MINGW_LIB_NAME)/ $(gladegtkextracatalog) > $@
install: $(MINGW_CATALOG_FILE) $(DLL_LIB) $(DLL_EXP_LIB) $(gtkextra_mingw_pkgconf_file)
install $(MINGW_CATALOG_FILE) $(gladecatalogdir)/
install $(DLL_LIB) $(DLL_EXP_LIB) $(glademoduledir)/
$(MAKE) -C $(SUBDIRS) -f Makefile.mingw install
clean:
rm -f $(DLL_OBJS) $(STATIC_LIB) $(DLL_LIB) $(DLL_EXP_LIB) $(MINGW_CATALOG_FILE) $(TESTEXE)