added g_array_insert_vals() to insert elements at an arbitrary index, and
[platform/upstream/glib.git] / makefile.lcc
1 ## Makefile for building glib.dll and gmodule.dll with lcc
2 ## Use: make -f makefile.lcc
3 ## Note that testglib crashes when compiled with lcc...
4
5 INSTALL = copy/y
6 TOUCH = copy/y makefile.lcc
7
8 CFLAGS = -I. -O
9 CC = lcc
10 LD = lcclnk
11
12 BIN = C:\bin
13
14 all : \
15         glibconfig.h    \
16         glib.dll        \
17         gmodule\gmoduleconf.h \
18         gmodule.dll     \
19         testglib.exe    \
20         testgmodule.exe
21
22 install : all
23         $(INSTALL) glib.dll $(BIN)
24         $(INSTALL) gmodule.dll $(BIN)
25         $(TOUCH) install
26
27 glib_OBJECTS = \
28         garray.obj      \
29         gcache.obj      \
30         gcompletion.obj \
31         gdataset.obj    \
32         gerror.obj      \
33         ghash.obj       \
34         glist.obj       \
35         gmem.obj        \
36         gmessages.obj   \
37         gnode.obj       \
38         gprimes.obj     \
39         gslist.obj      \
40         gtimer.obj      \
41         gtree.obj       \
42         grel.obj        \
43         gstring.obj     \
44         gstrfuncs.obj   \
45         gscanner.obj    \
46         gutils.obj
47
48 glib.dll : $(glib_OBJECTS)
49         $(LD) -dll -o glib.dll $(glib_OBJECTS)
50         implib glib.dll
51
52 glibconfig.h: glibconfig.h.win32
53         copy glibconfig.h.win32 glibconfig.h
54
55 .c.obj :
56         $(CC) $(CFLAGS) -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib $<
57
58 gmodule_OBJECTS = \
59         gmodule.obj
60
61 gmodule.dll : $(gmodule_OBJECTS)
62         $(LD) -dll -o gmodule.dll $(gmodule_OBJECTS) glib.lib 
63         implib gmodule.dll
64
65 gmodule.obj : gmodule\gmodule.c gmodule\gmodule-win32.c 
66         $(CC) $(CFLAGS) -Igmodule -DCOMPILING_GMODULE -DG_LIB_DOMAIN=g_log_domain_gmodule gmodule\gmodule.c
67
68 gmodule\gmoduleconf.h: gmodule\gmoduleconf.h.win32
69         copy gmodule\gmoduleconf.h.win32 gmodule\gmoduleconf.h
70
71 testglib.exe : glib.dll testglib.obj
72         $(LD) -o testglib.exe testglib.obj glib.lib
73
74 testglib.obj : testglib.c
75         $(CC) $(CFLAGS) testglib.c
76
77 testgmodule.exe : glib.dll gmodule.dll testgmodule.obj libgplugin_a.dll libgplugin_b.dll
78         $(LD) -o testgmodule.exe testgmodule.obj testgmodule.def glib.lib gmodule.lib
79
80 testgmodule.obj : gmodule\testgmodule.c
81         $(CC) $(CFLAGS) -Igmodule gmodule\testgmodule.c
82
83 libgplugin_a.dll : libgplugin_a.obj
84         $(LD) -dll -o libgplugin_a.dll libgplugin_a.obj glib.lib gmodule.lib
85
86 libgplugin_a.obj : gmodule\libgplugin_a.c
87         $(CC) $(CFLAGS) -Igmodule gmodule\libgplugin_a.c
88
89 libgplugin_b.dll : libgplugin_b.obj
90         $(LD) -dll -o libgplugin_b.dll libgplugin_b.obj /link glib.lib gmodule.lib
91
92 libgplugin_b.obj : gmodule\libgplugin_b.c
93         $(CC) $(CFLAGS) -Igmodule gmodule\libgplugin_b.c
94
95 clean:
96         del *.exe
97         del *.obj
98         del *.dll
99         del *.lib