[18285] | 1 | ## Makefile for building the gtk theme engines with gcc -mno-cygwin |
---|
| 2 | ## Use: make -f makefile.cygwin |
---|
| 3 | |
---|
| 4 | # Where the themes will be installed. This is where gtk+ looks for them |
---|
| 5 | # by default (replace /windows with your Windows directory) |
---|
| 6 | #THEMES = /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 $(MAKE) -f makefile.cygwin theme-all DIR=$$d; done |
---|
| 23 | |
---|
| 24 | install : |
---|
| 25 | for d in $(SUBDIRS); do $(MAKE) -f makefile.cygwin theme-install DIR=$$d; done |
---|
| 26 | |
---|
| 27 | clean : |
---|
| 28 | for d in $(SUBDIRS); do $(MAKE) -f makefile.cygwin theme-clean DIR=$$d; done |
---|
| 29 | |
---|
| 30 | ifdef DIR |
---|
| 31 | |
---|
| 32 | theme-all : |
---|
| 33 | cd $(DIR); $(MAKE) -f ../makefile.cygwin THEME=$(DIR) this_is_$(DIR)=1 all |
---|
| 34 | |
---|
| 35 | theme-install : |
---|
| 36 | cd $(DIR); $(MAKE) -f ../makefile.cygwin THEME=$(DIR) install |
---|
| 37 | |
---|
| 38 | theme-clean : |
---|
| 39 | cd $(DIR); $(MAKE) -f ../makefile.cygwin THEME=$(DIR) clean |
---|
| 40 | |
---|
| 41 | endif |
---|
| 42 | |
---|
| 43 | |
---|
| 44 | else |
---|
| 45 | |
---|
| 46 | # This part is included by makefiles below |
---|
| 47 | |
---|
| 48 | GTK_VER = 1.3 |
---|
| 49 | GLIB_VER = 1.3 |
---|
| 50 | |
---|
| 51 | OPTIMIZE = -O |
---|
| 52 | |
---|
| 53 | CC = gcc -mno-cygwin -mpentium -fnative-struct |
---|
| 54 | |
---|
| 55 | INSTALL = install |
---|
| 56 | |
---|
| 57 | GTK = ../../gtk+ |
---|
| 58 | GLIB = ../../glib |
---|
| 59 | GDK_IMLIB = ../../imlib/gdk_imlib |
---|
| 60 | |
---|
| 61 | ENGINES = $(THEMES)/engines |
---|
| 62 | ENGGTK = $(THEMES)/$(THEME)/gtk |
---|
| 63 | |
---|
| 64 | CFLAGS = -I. -I$(GLIB) -I$(GLIB)/gmodule -I$(GTK)/gdk -I$(GTK) -I$(GDK_IMLIB) |
---|
| 65 | |
---|
| 66 | ifdef this_is_pixmap |
---|
| 67 | EXTRALIBS = -L $(GDK_IMLIB) -lgdk_imlib |
---|
| 68 | endif |
---|
| 69 | |
---|
| 70 | ifndef OBJECTS |
---|
| 71 | OBJECTS = \ |
---|
| 72 | $(THEME)_theme_draw.o \ |
---|
| 73 | $(THEME)_theme_main.o |
---|
| 74 | endif |
---|
| 75 | |
---|
| 76 | all : \ |
---|
| 77 | $(THEME).dll |
---|
| 78 | |
---|
| 79 | install : all |
---|
| 80 | -mkdir $(ENGINES) |
---|
| 81 | $(INSTALL) $(THEME).dll $(ENGINES) |
---|
| 82 | -mkdir $(THEMES)/$(THEME) |
---|
| 83 | -mkdir $(THEMES)/$(THEME)/gtk |
---|
| 84 | -$(INSTALL) Theme/gtk/*.png $(ENGGTK) |
---|
| 85 | $(INSTALL) Theme/gtk/gtkrc $(ENGGTK) |
---|
| 86 | |
---|
| 87 | $(THEME).dll : $(OBJECTS) |
---|
| 88 | $(GLIB)/build-dll $(THEME) - ../engine.def $(OBJECTS) -L $(GTK)/gtk -lgtk-$(GTK_VER) -L $(GTK)/gdk -lgdk-$(GTK_VER) $(EXTRALIBS) -L $(GLIB) -lglib-$(GLIB_VER) -lgmodule-$(GLIB_VER) -lgdi32 -luser32 $(LDFLAGS) |
---|
| 89 | |
---|
| 90 | .c.o : |
---|
| 91 | $(CC) $(CFLAGS) -c $< |
---|
| 92 | |
---|
| 93 | clean: |
---|
| 94 | -rm *.dll *.o |
---|
| 95 | |
---|
| 96 | endif |
---|