| 1 # |
|
| 2 # Makefile.mingw |
|
| 3 # |
|
| 4 # Description: Makefile for win32 (mingw) version of liboscar |
|
| 5 # |
|
| 6 |
|
| 7 # |
|
| 8 # PATHS |
|
| 9 # |
|
| 10 |
|
| 11 OSCAR_ROOT := . |
|
| 12 GTK_TOP := ../../../../win32-dev/gtk_2_0 |
|
| 13 GAIM_TOP := ../../.. |
|
| 14 GAIM_INSTALL_DIR := $(GAIM_TOP)/win32-install-dir |
|
| 15 |
|
| 16 ## |
|
| 17 ## VARIABLE DEFINITIONS |
|
| 18 ## |
|
| 19 |
|
| 20 TARGET = liboscar |
|
| 21 |
|
| 22 # Compiler Options |
|
| 23 |
|
| 24 CFLAGS = |
|
| 25 |
|
| 26 DEFINES = |
|
| 27 |
|
| 28 # Static or Plugin... |
|
| 29 ifeq ($(TYPE),STATIC) |
|
| 30 DEFINES += -DSTATIC |
|
| 31 DLL_INSTALL_DIR = $(GAIM_INSTALL_DIR) |
|
| 32 else |
|
| 33 ifeq ($(TYPE),PLUGIN) |
|
| 34 DLL_INSTALL_DIR = $(GAIM_INSTALL_DIR)/plugins |
|
| 35 endif |
|
| 36 endif |
|
| 37 |
|
| 38 |
|
| 39 ## |
|
| 40 ## INCLUDE MAKEFILES |
|
| 41 ## |
|
| 42 |
|
| 43 include $(GAIM_TOP)/src/win32/global.mak |
|
| 44 |
|
| 45 ## |
|
| 46 ## INCLUDE PATHS |
|
| 47 ## |
|
| 48 |
|
| 49 INCLUDE_PATHS += -I$(OSCAR_ROOT) \ |
|
| 50 -I$(GTK_TOP)/include \ |
|
| 51 -I$(GTK_TOP)/include/gtk-2.0 \ |
|
| 52 -I$(GTK_TOP)/include/glib-2.0 \ |
|
| 53 -I$(GTK_TOP)/include/pango-1.0 \ |
|
| 54 -I$(GTK_TOP)/include/atk-1.0 \ |
|
| 55 -I$(GTK_TOP)/lib/glib-2.0/include \ |
|
| 56 -I$(GTK_TOP)/lib/gtk-2.0/include \ |
|
| 57 -I$(GAIM_TOP)/src \ |
|
| 58 -I$(GAIM_TOP)/src/win32 \ |
|
| 59 -I$(GAIM_TOP) |
|
| 60 |
|
| 61 |
|
| 62 LIB_PATHS = -L$(GTK_TOP)/lib \ |
|
| 63 -L$(GAIM_TOP)/src |
|
| 64 |
|
| 65 |
|
| 66 ## |
|
| 67 ## SOURCES, OBJECTS |
|
| 68 ## |
|
| 69 |
|
| 70 C_SRC = \ |
|
| 71 bstream.c \ |
|
| 72 family_admin.c \ |
|
| 73 family_advert.c \ |
|
| 74 family_alert.c \ |
|
| 75 family_auth.c \ |
|
| 76 family_bart.c \ |
|
| 77 family_bos.c \ |
|
| 78 family_buddy.c \ |
|
| 79 family_chat.c \ |
|
| 80 family_chatnav.c \ |
|
| 81 family_icq.c \ |
|
| 82 family_icbm.c \ |
|
| 83 family_invite.c \ |
|
| 84 family_locate.c \ |
|
| 85 family_odir.c \ |
|
| 86 family_popup.c \ |
|
| 87 family_oservice.c \ |
|
| 88 family_feedbag.c \ |
|
| 89 family_stats.c \ |
|
| 90 family_translate.c \ |
|
| 91 family_userlookup.c \ |
|
| 92 flap_connection.c \ |
|
| 93 misc.c \ |
|
| 94 msgcookie.c \ |
|
| 95 odc.c \ |
|
| 96 oft.c \ |
|
| 97 oscar.c \ |
|
| 98 oscar_data.c \ |
|
| 99 peer.c \ |
|
| 100 peer_proxy.c \ |
|
| 101 rxhandlers.c \ |
|
| 102 snac.c \ |
|
| 103 tlv.c \ |
|
| 104 util.c |
|
| 105 |
|
| 106 |
|
| 107 OBJECTS = $(C_SRC:%.c=%.o) |
|
| 108 |
|
| 109 |
|
| 110 ## |
|
| 111 ## LIBRARIES |
|
| 112 ## |
|
| 113 |
|
| 114 LIBS = -lgtk-win32-2.0 \ |
|
| 115 -lglib-2.0 \ |
|
| 116 -lgdk-win32-2.0 \ |
|
| 117 -lgmodule-2.0 \ |
|
| 118 -lgobject-2.0 \ |
|
| 119 -lintl \ |
|
| 120 -lws2_32 \ |
|
| 121 -lgaim |
|
| 122 |
|
| 123 |
|
| 124 ## |
|
| 125 ## RULES |
|
| 126 ## |
|
| 127 |
|
| 128 # How to make a C file |
|
| 129 |
|
| 130 %.o: %.c |
|
| 131 $(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o $@ -c $< |
|
| 132 |
|
| 133 ## |
|
| 134 ## TARGET DEFINITIONS |
|
| 135 ## |
|
| 136 |
|
| 137 .PHONY: all clean |
|
| 138 |
|
| 139 all: $(TARGET).dll |
|
| 140 |
|
| 141 install: |
|
| 142 cp $(OSCAR_ROOT)/$(TARGET).dll $(DLL_INSTALL_DIR) |
|
| 143 |
|
| 144 |
|
| 145 ## |
|
| 146 ## BUILD Dependencies |
|
| 147 ## |
|
| 148 |
|
| 149 $(GAIM_TOP)/src/gaim.lib: |
|
| 150 $(MAKE) -C $(GAIM_TOP)/src -f Makefile.mingw gaim.lib |
|
| 151 |
|
| 152 ## |
|
| 153 ## BUILD DLL |
|
| 154 ## |
|
| 155 |
|
| 156 $(TARGET).dll: $(OBJECTS) $(GAIM_TOP)/src/gaim.lib |
|
| 157 $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -Wl,--out-implib,$(TARGET).lib -o $(TARGET).dll |
|
| 158 |
|
| 159 ## |
|
| 160 ## CLEAN RULES |
|
| 161 ## |
|
| 162 |
|
| 163 clean: |
|
| 164 rm -rf *.o |
|
| 165 rm -rf $(TARGET).dll |
|
| 166 rm -rf $(TARGET).lib |
|