summaryrefslogtreecommitdiff
path: root/gmodule/makefile.msc.in
blob: d2ce4d185711b7dfcdbbfa2379b6a8f452db297a (plain)
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
## Makefile for building the gmodule dll with Microsoft C
## Use: nmake -f makefile.msc install

TOP = ..\..

!INCLUDE $(TOP)\build\win32\make.msc

# Possibly override GLib version in build\win32\module.defs
GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@

################################################################

# Nothing much configurable below

INCLUDES = -I .. -I . -I ..\glib
DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"GModule\"

all : \
	gmoduleconf.h \
	gmodule-$(GLIB_VER).dll \
	testgmodule.exe

gmodule_OBJECTS = \
	gmodule.obj

gmoduleconf.h: gmoduleconf.h.win32
	copy gmoduleconf.h.win32 gmoduleconf.h

makefile.msc: makefile.msc.in
	$(SED) -e s,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@, \
	       -e s,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@, <makefile.msc.in >$@

gmodule-$(GLIB_VER).dll : $(gmodule_OBJECTS) gmodule.def
	$(CC) $(CFLAGS) -LD -Fegmodule-$(GLIB_VER).dll $(gmodule_OBJECTS) \
	..\glib\glib-$(GLIB_VER).lib $(LDFLAGS) /def:gmodule.def

################ test prog

testgmodule.exe : gmodule-$(GLIB_VER).dll testgmodule.obj libgplugin_a.dll libgplugin_b.dll
	$(CC) $(CFLAGS) testgmodule.obj gmodule-$(GLIB_VER).lib \
	..\glib\glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console 

libgplugin_a.dll : libgplugin_a.obj
	$(CC) $(CFLAGS) -LD libgplugin_a.obj gmodule-$(GLIB_VER).lib \
	..\glib\glib-$(GLIB_VER).lib $(LDFLAGS)

libgplugin_b.dll : libgplugin_b.obj
	$(CC) $(CFLAGS) -LD libgplugin_b.obj gmodule-$(GLIB_VER).lib \
	..\glib\glib-$(GLIB_VER).lib $(LDFLAGS)

clean::
	del gmoduleconf.h