comparison plugins/win32/winprefs/Makefile.mingw @ 4134:c0f4c664e3ba

[gaim-migrate @ 4352] Initial import committer: Tailor Script <tailor@pidgin.im>
author Herman Bloggs <hermanator12002@yahoo.com>
date Tue, 24 Dec 2002 19:46:01 +0000
parents
children bb7723f0b4b9
comparison
equal deleted inserted replaced
4133:d3d1dac745d4 4134:c0f4c664e3ba
1 #
2 # Makefile.mingw
3 #
4 # Description: Makefile for winprefs plugin.
5 #
6
7 #
8 # PATHS
9 #
10
11 GTK_TOP := ../../../../win32-dev/gtk_2_0
12 GAIM_TOP := ../../..
13 GAIM_INSTALL_DIR := $(GAIM_TOP)/win32-install-dir
14 DLL_INSTALL_DIR := $(GAIM_INSTALL_DIR)/plugins
15
16 ##
17 ## VARIABLE DEFINITIONS
18 ##
19
20 TARGET = winprefs
21
22 CC = gcc.exe
23
24 VERSION := $(shell cat $(GAIM_TOP)/VERSION)
25
26 # Compiler Options
27
28 CFLAGS = -O2 -Wall -Werror -mno-cygwin -fnative-struct
29
30 DEFINES = -DVERSION=\"$(VERSION)\" \
31 -DGTK_ENABLE_BROKEN
32
33
34 ##
35 ## INCLUDE MAKEFILES
36 ##
37
38
39 ##
40 ## INCLUDE PATHS
41 ##
42
43 INCLUDE_PATHS += -I. \
44 -I$(GTK_TOP)/include \
45 -I$(GTK_TOP)/include/gtk-2.0 \
46 -I$(GTK_TOP)/include/glib-2.0 \
47 -I$(GTK_TOP)/include/pango-1.0 \
48 -I$(GTK_TOP)/include/atk-1.0 \
49 -I$(GTK_TOP)/lib/glib-2.0/include \
50 -I$(GTK_TOP)/lib/gtk-2.0/include \
51 -I$(GAIM_TOP)/src \
52 -I$(GAIM_TOP)/src/win32 \
53 -I$(GAIM_TOP)
54
55
56 LIB_PATHS = -L$(GTK_TOP)/lib \
57 -L$(GAIM_TOP)/src
58
59
60 ##
61 ## SOURCES, OBJECTS
62 ##
63
64 C_SRC = winprefs.c
65
66
67 OBJECTS = $(C_SRC:%.c=%.o)
68
69
70 ##
71 ## LIBRARIES
72 ##
73
74 LIBS = -lgtk-win32-2.0 \
75 -lglib-2.0 \
76 -lgdk-win32-2.0 \
77 -lgmodule-2.0 \
78 -lgobject-2.0 \
79 -lws2_32 \
80 -lintl \
81 -lgaim
82
83
84 ##
85 ## RULES
86 ##
87
88 # How to make a C file
89
90 %.o: %.c
91 $(CC) $(CFLAGS) $(DEFINES) $(INCLUDE_PATHS) -o $@ -c $<
92
93 ##
94 ## TARGET DEFINITIONS
95 ##
96
97 .PHONY: all clean
98
99 all: $(TARGET).dll
100
101 install:
102 cp $(TARGET).dll $(DLL_INSTALL_DIR)
103
104
105 ##
106 ## BUILD Dependencies
107 ##
108
109 $(GAIM_TOP)/src/gaim.lib:
110 $(MAKE) -C $(GAIM_TOP)/src -f Makefile.mingw gaim.lib
111
112 ##
113 ## BUILD DLL
114 ##
115
116 $(TARGET).def: $(OBJECTS)
117 dlltool --dllname $(TARGET).dll -z $(TARGET).def \
118 $(OBJECTS)
119
120 $(TARGET).base: $(OBJECTS) $(GAIM_TOP)/src/gaim.lib
121 gcc -mdll -o junk.tmp -Wl,--base-file,$@ $(OBJECTS) $(LIB_PATHS) $(LIBS)
122 rm -rf junk.tmp
123
124 $(TARGET).exp: $(TARGET).def $(TARGET).base
125 dlltool --dllname $(TARGET).dll --base-file $(TARGET).base \
126 --output-exp $(TARGET).exp --def $(TARGET).def
127 rm -rf $(TARGET).base
128
129 $(TARGET).dll: $(OBJECTS) $(TARGET).exp $(GAIM_TOP)/src/gaim.lib
130 gcc -mdll -o $(TARGET).dll $(OBJECTS) -Wl,$(TARGET).exp $(LIB_PATHS) $(LIBS)
131 rm -rf $(TARGET).exp
132
133
134 ##
135 ## CLEAN RULES
136 ##
137
138 clean:
139 rm -rf *.o
140 rm -rf $(TARGET).dll
141 rm -rf $(TARGET).def