Sun, 16 Mar 2003 00:01:49 +0000
[gaim-migrate @ 5113]
this removes all the remaining deprecated glib, gdk, gdk-pixbuf, and gtk
function calls. Hopefully I didn't break anything.
Most of this is due to the deprecation of g_strcasecmp and g_strncasecmp.
Two functions I never thought would be deprecated, but apparently they're
no good at comparing utf8 text. g_ascii_str{,n}casecmp is OK when you're
sure that it's ASCII. Otherwise, we're supposed to use g_utf8_collate(),
except that it is case sensitive. Since glib doesn't currently have a
case-insensitive one, I wrote one. If you need to compare utf8 text, you
can use gaim_utf8_strcasecmp().
I have to go do dishes now.
| 3630 | 1 | # |
| 2 | # Makefile.mingw | |
| 3 | # | |
| 4 | # Description: Makefile for win32 (mingw) version of libgg | |
| 5 | # | |
| 6 | ||
| 7 | # | |
| 8 | # PATHS | |
| 9 | # | |
| 10 | ||
| 11 | INCLUDE_DIR := . | |
| 12 | GTK_TOP := ../../../../win32-dev/gtk_2_0 | |
| 13 | GAIM_TOP := ../../.. | |
| 14 | GG_ROOT := . | |
| 15 | GAIM_INSTALL_DIR := $(GAIM_TOP)/win32-install-dir | |
| 16 | ||
| 17 | ## | |
| 18 | ## VARIABLE DEFINITIONS | |
| 19 | ## | |
| 20 | ||
| 21 | TARGET = libgg | |
| 22 | ||
| 23 | # Compiler Options | |
| 24 | ||
|
3718
6db53e60577c
[gaim-migrate @ 3851]
Herman Bloggs <herman@bluedigits.com>
parents:
3630
diff
changeset
|
25 | CFLAGS = |
| 3630 | 26 | |
|
3718
6db53e60577c
[gaim-migrate @ 3851]
Herman Bloggs <herman@bluedigits.com>
parents:
3630
diff
changeset
|
27 | DEFINES = |
| 3630 | 28 | |
| 29 | # Static or Plugin... | |
| 30 | ifeq ($(TYPE),STATIC) | |
| 31 | DEFINES += -DSTATIC | |
| 32 | DLL_INSTALL_DIR = $(GAIM_INSTALL_DIR) | |
| 33 | else | |
| 34 | ifeq ($(TYPE),PLUGIN) | |
| 35 | DLL_INSTALL_DIR = $(GAIM_INSTALL_DIR)/plugins | |
| 36 | endif | |
| 37 | endif | |
| 38 | ||
| 39 | ||
| 40 | ## | |
| 41 | ## INCLUDE MAKEFILES | |
| 42 | ## | |
| 43 | ||
|
3718
6db53e60577c
[gaim-migrate @ 3851]
Herman Bloggs <herman@bluedigits.com>
parents:
3630
diff
changeset
|
44 | include $(GAIM_TOP)/src/win32/global.mak |
| 3630 | 45 | |
| 46 | ## | |
| 47 | ## INCLUDE PATHS | |
| 48 | ## | |
| 49 | ||
| 50 | INCLUDE_PATHS += -I$(GG_ROOT) \ | |
| 51 | -I$(GTK_TOP)/include \ | |
| 52 | -I$(GTK_TOP)/include/gtk-2.0 \ | |
| 53 | -I$(GTK_TOP)/include/glib-2.0 \ | |
| 54 | -I$(GTK_TOP)/include/pango-1.0 \ | |
| 55 | -I$(GTK_TOP)/include/atk-1.0 \ | |
| 56 | -I$(GTK_TOP)/lib/glib-2.0/include \ | |
| 57 | -I$(GTK_TOP)/lib/gtk-2.0/include \ | |
| 58 | -I$(GAIM_TOP)/src \ | |
| 59 | -I$(GAIM_TOP)/src/win32 \ | |
| 60 | -I$(GAIM_TOP) | |
| 61 | ||
| 62 | ||
| 63 | LIB_PATHS = -L$(GTK_TOP)/lib \ | |
| 64 | -L$(GAIM_TOP)/src \ | |
| 65 | ||
| 66 | ||
| 67 | ## | |
| 68 | ## SOURCES, OBJECTS | |
| 69 | ## | |
| 70 | ||
| 71 | C_SRC = libgg.c \ | |
| 72 | common.c \ | |
| 73 | gg.c | |
| 74 | ||
| 75 | OBJECTS = $(C_SRC:%.c=%.o) | |
| 76 | ||
| 77 | ||
| 78 | ## | |
| 79 | ## LIBRARIES | |
| 80 | ## | |
| 81 | ||
| 82 | LIBS = -lgtk-win32-2.0 -lglib-2.0 -lgdk-win32-2.0 -lgmodule-2.0 -lgobject-2.0 -lintl -lgaim -lws2_32 | |
| 83 | ||
| 84 | # -liberty | |
| 85 | ||
| 86 | ||
| 87 | ## | |
| 88 | ## RULES | |
| 89 | ## | |
| 90 | ||
| 91 | # How to make a C file | |
| 92 | ||
| 93 | %.o: %.c | |
|
3718
6db53e60577c
[gaim-migrate @ 3851]
Herman Bloggs <herman@bluedigits.com>
parents:
3630
diff
changeset
|
94 | $(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o $@ -c $< |
| 3630 | 95 | |
| 96 | ## | |
| 97 | ## TARGET DEFINITIONS | |
| 98 | ## | |
| 99 | ||
| 100 | .PHONY: all clean | |
| 101 | ||
| 102 | all: $(TARGET).dll | |
| 103 | ||
| 104 | install: | |
| 105 | cp $(GG_ROOT)/$(TARGET).dll $(DLL_INSTALL_DIR) | |
| 106 | ||
| 107 | ||
| 108 | ## | |
| 109 | ## BUILD Dependencies | |
| 110 | ## | |
| 111 | ||
| 112 | $(GAIM_TOP)/src/gaim.lib: | |
| 113 | $(MAKE) -C $(GAIM_TOP)/src -f Makefile.mingw gaim.lib | |
| 114 | ||
| 115 | ## | |
| 116 | ## BUILD DLL | |
| 117 | ## | |
| 118 | ||
| 119 | $(TARGET).def: $(OBJECTS) | |
| 120 | dlltool --dllname $(TARGET).dll -z $(TARGET).def \ | |
| 121 | $(OBJECTS) | |
| 122 | ||
| 123 | $(TARGET).base: $(OBJECTS) $(GAIM_TOP)/src/gaim.lib | |
|
3718
6db53e60577c
[gaim-migrate @ 3851]
Herman Bloggs <herman@bluedigits.com>
parents:
3630
diff
changeset
|
124 | $(CC) -mdll -o junk.tmp -Wl,--base-file,$@ $(OBJECTS) $(LIB_PATHS) $(LIBS) |
| 3630 | 125 | rm -rf junk.tmp |
| 126 | ||
| 127 | $(TARGET).exp: $(TARGET).def $(TARGET).base | |
| 128 | dlltool --dllname $(TARGET).dll --base-file $(TARGET).base \ | |
| 129 | --output-exp $(TARGET).exp --def $(TARGET).def | |
| 130 | rm -rf $(TARGET).base | |
| 131 | ||
| 132 | $(TARGET).dll: $(OBJECTS) $(TARGET).exp $(GAIM_TOP)/src/gaim.lib | |
| 133 | dlltool -D $(TARGET).dll -d $(TARGET).def -l $(TARGET).lib | |
|
3718
6db53e60577c
[gaim-migrate @ 3851]
Herman Bloggs <herman@bluedigits.com>
parents:
3630
diff
changeset
|
134 | $(CC) -mdll -o $(TARGET).dll $(OBJECTS) -Wl,$(TARGET).exp $(LIB_PATHS) $(LIBS) |
| 3630 | 135 | rm -rf $(TARGET).exp |
| 136 | ||
| 137 | ||
| 138 | ## | |
| 139 | ## CLEAN RULES | |
| 140 | ## | |
| 141 | ||
| 142 | clean: | |
| 143 | rm -rf *.o | |
| 144 | rm -rf $(TARGET).dll | |
| 145 | rm -rf $(TARGET).lib | |
| 146 | rm -rf $(TARGET).def |