1 | ## Makefile for building gtk-engines with Microsoft C |
---|
2 | ## Use: nmake -f makefile.msc |
---|
3 | |
---|
4 | # Where the themes will be installed. This is where gtk looks for them |
---|
5 | # by default (replace C:\windows with your Windows directory) |
---|
6 | #THEMES = C:\windows\gtk\themes |
---|
7 | # This is what I use as installation target, from where the installer-builder |
---|
8 | # will pick it up. |
---|
9 | THEMES = \src\themes |
---|
10 | |
---|
11 | ################################################################ |
---|
12 | |
---|
13 | # Nothing much configurable below |
---|
14 | |
---|
15 | !IFNDEF THEME |
---|
16 | |
---|
17 | # This part is used from this directory |
---|
18 | |
---|
19 | SUBDIRS = Metal Notif Redmond95 Pixmap |
---|
20 | |
---|
21 | all : |
---|
22 | for %d in ($(SUBDIRS)) do nmake -nologo -f makefile.msc theme-all DIR=%d |
---|
23 | |
---|
24 | install : |
---|
25 | for %d in ($(SUBDIRS)) do nmake -nologo -f makefile.msc theme-install DIR=%d |
---|
26 | |
---|
27 | clean : |
---|
28 | for %d in ($(SUBDIRS)) do nmake -nologo -f makefile.msc theme-clean DIR=%d |
---|
29 | |
---|
30 | !IFDEF DIR |
---|
31 | |
---|
32 | theme-all : |
---|
33 | cd $(DIR) |
---|
34 | nmake -nologo -f ..\makefile.msc THEME=$(DIR) this_is_$(DIR)=1 all |
---|
35 | cd .. |
---|
36 | |
---|
37 | theme-install : |
---|
38 | cd $(DIR) |
---|
39 | nmake -nologo -f ..\makefile.msc THEME=$(DIR) install |
---|
40 | cd .. |
---|
41 | |
---|
42 | theme-clean : |
---|
43 | cd $(DIR) |
---|
44 | nmake -nologo -f ..\makefile.msc THEME=$(DIR) clean |
---|
45 | cd .. |
---|
46 | |
---|
47 | !ENDIF |
---|
48 | |
---|
49 | |
---|
50 | !ELSE |
---|
51 | |
---|
52 | # This part is included by makefiles below |
---|
53 | |
---|
54 | GTK_VER = 1.3 |
---|
55 | GLIB_VER = 1.3 |
---|
56 | |
---|
57 | # cl -? describes the options |
---|
58 | CC = cl -G5 -GF -Ox -W3 -MD -nologo |
---|
59 | LDFLAGS = /link |
---|
60 | INSTALL = copy |
---|
61 | |
---|
62 | GTK = ..\..\gtk+ |
---|
63 | GLIB = ..\..\glib |
---|
64 | GDK_IMLIB = ..\..\imlib\gdk_imlib |
---|
65 | |
---|
66 | ENGINES = $(THEMES)\engines |
---|
67 | ENGGTK = $(THEMES)\$(THEME)\gtk |
---|
68 | |
---|
69 | CFLAGS = -I. -I$(GLIB) -I$(GLIB)\gmodule -I$(GTK)\gdk\win32 -I$(GTK) -I$(GDK_IMLIB) |
---|
70 | |
---|
71 | !IFDEF this_is_Pixmap |
---|
72 | EXTRALIBS = $(GDK_IMLIB)\gdk_imlib.lib |
---|
73 | !ENDIF |
---|
74 | |
---|
75 | !IFNDEF OBJECTS |
---|
76 | OBJECTS = \ |
---|
77 | $(THEME)_theme_draw.obj \ |
---|
78 | $(THEME)_theme_main.obj |
---|
79 | !ENDIF |
---|
80 | |
---|
81 | all : \ |
---|
82 | $(THEME).dll |
---|
83 | |
---|
84 | install : all |
---|
85 | -mkdir $(ENGINES) |
---|
86 | $(INSTALL) $(THEME).dll $(ENGINES) |
---|
87 | -mkdir $(THEMES)\$(THEME) |
---|
88 | -mkdir $(THEMES)\$(THEME)\gtk |
---|
89 | $(INSTALL) Theme\gtk\*.png $(ENGGTK) |
---|
90 | $(INSTALL) Theme\gtk\gtkrc $(ENGGTK) |
---|
91 | |
---|
92 | $(THEME).dll : $(OBJECTS) |
---|
93 | $(CC) $(CFLAGS) -LD -Fe$(THEME).dll $(OBJECTS) $(GTK)\gtk\gtk-$(GTK_VER).lib $(GTK)\gdk\win32\gdk-$(GTK_VER).lib $(EXTRALIBS) $(GLIB)\glib-$(GLIB_VER).lib $(GLIB)\gmodule-$(GLIB_VER).lib gdi32.lib user32.lib $(LDFLAGS) /def:..\engine.def |
---|
94 | |
---|
95 | .c.obj : |
---|
96 | $(CC) $(CFLAGS) -GD -c $< |
---|
97 | |
---|
98 | clean: |
---|
99 | del *.exe |
---|
100 | del *.obj |
---|
101 | del *.dll |
---|
102 | del *.lib |
---|
103 | del *.exp |
---|
104 | del *.err |
---|
105 | del *.map |
---|
106 | del *.sym |
---|
107 | del *.pdb |
---|
108 | del *.ilk |
---|
109 | |
---|
110 | !ENDIF |
---|