makefile.msc.in 3.02 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
	libglib-2.0-0.dll \
21
	glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.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
	gbacktrace.obj		\
35
	gbase64.obj	\
36
	gbookmarkfile.obj 	\
Tor Lillqvist's avatar
Tor Lillqvist committed
37 38 39 40 41
	gcache.obj		\
	gcompletion.obj		\
	gconvert.obj		\
	gdataset.obj		\
	gdate.obj		\
42
	gdir.obj	\
Tor Lillqvist's avatar
Tor Lillqvist committed
43 44 45 46
	gerror.obj		\
	gfileutils.obj		\
	ghash.obj		\
	ghook.obj		\
47
	gkeyfile.obj		\
48
	gmappedfile.obj	\
Tor Lillqvist's avatar
Tor Lillqvist committed
49 50 51 52
	giochannel.obj		\
	giowin32.obj		\
	glist.obj		\
	gmain.obj		\
Tor Lillqvist's avatar
Tor Lillqvist committed
53
	gmarkup.obj		\
Tor Lillqvist's avatar
Tor Lillqvist committed
54 55 56
	gmem.obj		\
	gmessages.obj		\
	gnode.obj		\
Hans Breuer's avatar
updated  
Hans Breuer committed
57
	goption.obj	\
Tor Lillqvist's avatar
Tor Lillqvist committed
58
	gprimes.obj		\
Tor Lillqvist's avatar
Tor Lillqvist committed
59
	gqsort.obj		\
Tor Lillqvist's avatar
Tor Lillqvist committed
60
	gqueue.obj		\
Hans Breuer's avatar
updated  
Hans Breuer committed
61
	gpattern.obj	\
Hans Breuer's avatar
Hans Breuer committed
62
	gprintf.obj	\
Tor Lillqvist's avatar
Tor Lillqvist committed
63 64 65 66
	grand.obj		\
	grel.obj		\
	gscanner.obj		\
	gshell.obj		\
Hans Breuer's avatar
Hans Breuer committed
67
	gslice.obj	\
Tor Lillqvist's avatar
Tor Lillqvist committed
68 69
	gslist.obj		\
	gspawn-win32.obj	\
70
	gstdio.obj	\
Tor Lillqvist's avatar
Tor Lillqvist committed
71 72 73 74 75 76
	gstrfuncs.obj		\
	gstring.obj		\
	gthread.obj		\
	gthreadpool.obj		\
	gtimer.obj		\
	gtree.obj		\
77
	gunibreak.obj		\
78
	gunicollate.obj		\
Tor Lillqvist's avatar
Tor Lillqvist committed
79 80 81 82
	gunidecomp.obj		\
	guniprop.obj		\
	gutf8.obj		\
	gutils.obj		\
83 84
	gwin32.obj		\
	localcharset.obj
85

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

Hans Breuer's avatar
Hans Breuer committed
89 90
..\config.h: ..\config.h.win32
	copy ..\config.h.win32 ..\config.h
91

92 93 94
galias.h: glib.symbols
	perl makegalias.pl < glib.symbols > galias.h

95 96 97
galiasdef.c: glib.symbols
	  perl makegalias.pl -def < glib.symbols > galiasdef.c

98 99 100
localcharset.c : libcharset/localcharset.c
	copy libcharset\localcharset.c localcharset.c

101 102
glib.def: glib.symbols
	echo EXPORTS > glib.def
103
	cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DINCLUDE_INTERNAL_SYMBOLS -DALL_FILES glib.symbols >> glib.def
104 105 106 107

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

108
################ glib
109

110
# create a static libary
111
# static library can well have the real version number in the name
Hans Breuer's avatar
Hans Breuer committed
112 113
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
114

Hans Breuer's avatar
Hans Breuer committed
115
libglib-2.0-0.dll : $(glib_OBJECTS) gnulib\gnulib.lib glib.def glib.res
116
	$(CC) $(CFLAGS) -LD -Fe$@ $(glib_OBJECTS) glib.res $(LIBICONV_LIBS) $(INTL_LIBS) \
Hans Breuer's avatar
Hans Breuer committed
117 118
	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
119

120 121
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
122

123
################ other stuff
124

125
clean::
Hans Breuer's avatar
Hans Breuer committed
126
	del ..\config.h
127
	del ..\glibconfig.h
Hans Breuer's avatar
Hans Breuer committed
128