makefile.msc.in 2.93 KB
Newer Older
1
## Makefile for building the GLib dlls with Microsoft C
2
## Use: nmake -f makefile.msc
3

Hans Breuer's avatar
Hans Breuer committed
4
TOP = ..\..
5

Tor Lillqvist's avatar
Update.  
Tor Lillqvist committed
6
!INCLUDE ..\build\win32\make.msc
7

8
################################################################
9

10
INCLUDES = -FImsvc_recommended_pragmas.h -I . -I ..
11
DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=\"GLib\" -DG_ENABLE_DEBUG
12
DEPCFLAGS = -Zm400 $(INTL_CFLAGS) $(LIBICONV_CFLAGS) $(DIRENT_CFLAGS)
13

Tor Lillqvist's avatar
Tor Lillqvist committed
14
all :				\
Hans Breuer's avatar
Hans Breuer committed
15 16
	..\config.h		\
	..\glibconfig.h	\
Hans Breuer's avatar
updated  
Hans Breuer committed
17
	galias.h		\
18
	galiasdef.c		\
Hans Breuer's avatar
Hans Breuer committed
19
	gnulib\gnulib.lib	\
Hans Breuer's avatar
Hans Breuer committed
20 21
	libglib-2.0-0.dll \
	glib-2.8s.lib \
Tor Lillqvist's avatar
Tor Lillqvist committed
22
	gspawn-win32-helper.exe	\
23

Hans Breuer's avatar
Hans Breuer committed
24

Hans Breuer's avatar
Hans Breuer committed
25 26
gnulib\gnulib.lib :
	cd gnulib
Hans Breuer's avatar
Hans Breuer committed
27 28 29
	nmake -f makefile.msc
	cd ..

Tor Lillqvist's avatar
Tor Lillqvist committed
30 31 32
glib_OBJECTS =			\
	garray.obj		\
	gasyncqueue.obj		\
33
	gatomic.obj	\
Tor Lillqvist's avatar
Tor Lillqvist committed
34 35 36 37 38 39
	gbacktrace.obj		\
	gcache.obj		\
	gcompletion.obj		\
	gconvert.obj		\
	gdataset.obj		\
	gdate.obj		\
40
	gdir.obj	\
Tor Lillqvist's avatar
Tor Lillqvist committed
41 42 43 44
	gerror.obj		\
	gfileutils.obj		\
	ghash.obj		\
	ghook.obj		\
45
	gkeyfile.obj		\
46
	gmappedfile.obj	\
Tor Lillqvist's avatar
Tor Lillqvist committed
47 48 49 50
	giochannel.obj		\
	giowin32.obj		\
	glist.obj		\
	gmain.obj		\
Tor Lillqvist's avatar
Tor Lillqvist committed
51
	gmarkup.obj		\
Tor Lillqvist's avatar
Tor Lillqvist committed
52 53 54
	gmem.obj		\
	gmessages.obj		\
	gnode.obj		\
Hans Breuer's avatar
updated  
Hans Breuer committed
55
	goption.obj	\
Tor Lillqvist's avatar
Tor Lillqvist committed
56
	gprimes.obj		\
Tor Lillqvist's avatar
Tor Lillqvist committed
57
	gqsort.obj		\
Tor Lillqvist's avatar
Tor Lillqvist committed
58
	gqueue.obj		\
Hans Breuer's avatar
updated  
Hans Breuer committed
59
	gpattern.obj	\
Hans Breuer's avatar
Hans Breuer committed
60
	gprintf.obj	\
Tor Lillqvist's avatar
Tor Lillqvist committed
61 62 63 64 65 66
	grand.obj		\
	grel.obj		\
	gscanner.obj		\
	gshell.obj		\
	gslist.obj		\
	gspawn-win32.obj	\
67
	gstdio.obj	\
Tor Lillqvist's avatar
Tor Lillqvist committed
68 69 70 71 72 73
	gstrfuncs.obj		\
	gstring.obj		\
	gthread.obj		\
	gthreadpool.obj		\
	gtimer.obj		\
	gtree.obj		\
74
	gunibreak.obj		\
75
	gunicollate.obj		\
Tor Lillqvist's avatar
Tor Lillqvist committed
76 77 78 79
	gunidecomp.obj		\
	guniprop.obj		\
	gutf8.obj		\
	gutils.obj		\
80 81
	gwin32.obj		\
	localcharset.obj
82

Hans Breuer's avatar
Hans Breuer committed
83 84
..\glibconfig.h: ..\glibconfig.h.win32
	copy ..\glibconfig.h.win32 ..\glibconfig.h
85

Hans Breuer's avatar
Hans Breuer committed
86 87
..\config.h: ..\config.h.win32
	copy ..\config.h.win32 ..\config.h
88

89 90 91
galias.h: glib.symbols
	perl makegalias.pl < glib.symbols > galias.h

92 93 94
galiasdef.c: glib.symbols
	  perl makegalias.pl -def < glib.symbols > galiasdef.c

95 96 97
localcharset.c : libcharset/localcharset.c
	copy libcharset\localcharset.c localcharset.c

98 99
glib.def: glib.symbols
	echo EXPORTS > glib.def
100
	cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DINCLUDE_INTERNAL_SYMBOLS -DALL_FILES glib.symbols >> glib.def
101 102 103 104

glib.res : glib.rc
	rc -DBUILDNUMBER=0 -r -fo glib.res glib.rc

105
################ glib
106

107
# create a static libary
108
# static library can well have the real version number in the name
Hans Breuer's avatar
Hans Breuer committed
109 110
glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib : $(glib_OBJECTS) gnulib\gnulib.lib
	lib /out:glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib $(glib_OBJECTS) gnulib\gnulib.lib
111

Hans Breuer's avatar
Hans Breuer committed
112
libglib-2.0-0.dll : $(glib_OBJECTS) gnulib\gnulib.lib glib.def glib.res
113
	$(CC) $(CFLAGS) -LD -Fe$@ $(glib_OBJECTS) glib.res $(LIBICONV_LIBS) $(INTL_LIBS) \
Hans Breuer's avatar
Hans Breuer committed
114 115
	gnulib\gnulib.lib $(DIRENT_LIBS) user32.lib advapi32.lib shell32.lib wsock32.lib ole32.lib ws2_32.lib \
	$(LDFLAGS) /implib:glib-2.0.lib /def:glib.def
116

117 118
gspawn-win32-helper.exe : gspawn-win32-helper.c libglib-2.0-@LT_CURRENT_MINUS_AGE@.dll
	$(CC) $(CFLAGS) -Fe$@ -DG_LOG_DOMAIN=\"gspawn-win32-helper\" gspawn-win32-helper.c glib-2.0.lib $(LDFLAGS) /subsystem:windows user32.lib
119

120
################ other stuff
121

122
clean::
Hans Breuer's avatar
Hans Breuer committed
123
	del ..\config.h
124
	del ..\glibconfig.h
Hans Breuer's avatar
Hans Breuer committed
125