i18n: Added header to .pot files for Launchpad
[sdk] / ear / extract / Makefile
1 .PHONY: all objdir clean realclean distclean
2
3 # CONTENT
4
5 MODULE := extract
6 CONFIG := release
7 COMPILER := default
8 TARGET_TYPE = executable
9
10 OBJ = obj/$(CONFIG).$(PLATFORM)/
11
12 RES = 
13
14 CONSOLE = -mwindows
15
16 TARGET = obj/$(CONFIG).$(PLATFORM)/extract$(E)
17
18 OBJECTS = \
19         $(OBJ)extract.o \
20         $(OBJ)$(MODULE).main$(O)
21
22 COBJECTS = \
23         $(OBJ)extract.c
24
25 SYMBOLS = \
26         $(OBJ)extract.sym
27
28 IMPORTS = \
29         $(OBJ)extract.imp
30
31 SOURCES = \
32         extract.ec
33
34 RESOURCES = \
35         ../../ecere/res/vanilla/ecere/actions/folderNew.png \
36         ../../ecere/res/vanilla/ecere/actions/goUp.png \
37         ../../ecere/res/vanilla/ecere/devices/computer.png \
38         ../../ecere/res/vanilla/ecere/devices/driveHardDisk.png \
39         ../../ecere/res/vanilla/ecere/devices/driveRemovableMedia.png \
40         ../../ecere/res/vanilla/ecere/devices/mediaFloppy.png \
41         ../../ecere/res/vanilla/ecere/devices/mediaOptical.png \
42         ../../ecere/res/vanilla/ecere/elements/areaClose.png \
43         ../../ecere/res/vanilla/ecere/elements/areaMaximize.png \
44         ../../ecere/res/vanilla/ecere/elements/areaMinimize.png \
45         ../../ecere/res/vanilla/ecere/elements/areaRestore.png \
46         ../../ecere/res/vanilla/ecere/elements/arrowDown.png \
47         ../../ecere/res/vanilla/ecere/elements/arrowLeft.png \
48         ../../ecere/res/vanilla/ecere/elements/arrowRight.png \
49         ../../ecere/res/vanilla/ecere/elements/arrowUp.png \
50         ../../ecere/res/vanilla/ecere/elements/optionBoxDisabledSelected.png \
51         ../../ecere/res/vanilla/ecere/elements/optionBoxDown.png \
52         ../../ecere/res/vanilla/ecere/elements/optionBoxSelected.png \
53         ../../ecere/res/vanilla/ecere/elements/optionBoxSelectedDown.png \
54         ../../ecere/res/vanilla/ecere/elements/optionBoxUp.png \
55         ../../ecere/res/vanilla/ecere/places/driveRemote.png \
56         ../../ecere/res/vanilla/ecere/places/folder.png \
57         ../../ecere/res/vanilla/ecere/places/folderRemote.png \
58         ../../ecere/res/vanilla/ecere/places/networkServer.png \
59         ../../ecere/res/vanilla/ecere/places/networkWorkgroup.png \
60         ../../ecere/res/vanilla/ecere/status/folderOpen.png \
61         locale/zh_CN/LC_MESSAGES/extract.mo
62
63 # CROSS-PLATFORM MAGIC
64
65 include ../../include.mk
66
67 # TOOLCHAIN
68 export LD_LIBRARY_PATH = ../../obj/$(PLATFORM)/lib/
69 export DYLD_LIBRARY_PATH = ../../obj/$(PLATFORM)/lib/
70 ECP := $(call psep,../../compiler/bootstrap/obj/bin.$(PLATFORM)/ecp)
71 ECC := $(call psep,../../compiler/bootstrap/obj/bin.$(PLATFORM)/ecc)
72 ECS := $(call psep,../../compiler/bootstrap/obj/bin.$(PLATFORM)/ecs)
73 EAR := $(call psep,../../obj/$(PLATFORM)/bin/ear)
74
75 # FLAGS
76
77 CFLAGS = -fmessage-length=0 -Os -m32 $(FPIC) -w \
78          -DECERE_STATIC
79
80 CECFLAGS =
81
82 ECFLAGS = -nolinenumbers
83
84 OFLAGS = -m32 \
85          -L../../ecere/obj/vanilla.$(PLATFORM) \
86          -L../../deps/zlib/obj/release.$(PLATFORM)
87
88 LIBS = -lecereVanilla -lz $(SHAREDLIB) $(EXECUTABLE) $(LINKOPT)
89
90 UPXFLAGS = -9 -q --no-progress --no-color
91
92 # HARD CODED PLATFORM-SPECIFIC OPTIONS
93 ifdef LINUX
94 OFLAGS += -Wl,--no-undefined
95 endif
96
97 # PLATFORM-SPECIFIC OPTIONS
98
99 ifdef WINDOWS
100
101 LIBS += -lmpr -lwinmm -limm32
102
103 else
104 ifdef LINUX
105
106 OFLAGS += \
107          -L/usr/X11R6/lib
108
109 LIBS += -lfontconfig -lfreetype -lXrender -lXext -lncurses -lm -ldl -lpthread -lX11
110
111 else
112 ifdef OSX
113
114 OFLAGS += \
115          -L/usr/X11R6/lib
116
117 LIBS += -lfontconfig -lfreetype -lXrender -lXext -lncurses -lm -ldl -lpthread -lX11
118
119 endif
120 endif
121 endif
122
123 # TARGETS
124
125 all: objdir $(TARGET)
126
127 objdir:
128         $(if $(wildcard $(OBJ)),,$(call mkdirq,$(OBJ)))
129
130 $(OBJ)$(MODULE).main.ec: $(SYMBOLS) $(COBJECTS)
131         $(ECS) $(ECSLIBOPT) $(SYMBOLS) $(IMPORTS) -symbols obj/$(CONFIG).$(PLATFORM) -o $(OBJ)$(MODULE).main.ec
132
133 $(OBJ)$(MODULE).main.c: $(OBJ)$(MODULE).main.ec
134         $(ECP) $(CECFLAGS) $(ECFLAGS) $(CFLAGS) -c $(OBJ)$(MODULE).main.ec -o $(OBJ)$(MODULE).main.sym -symbols $(OBJ)
135         $(ECC) $(CECFLAGS) $(ECFLAGS) $(CFLAGS) $(FVISIBILITY) -c $(OBJ)$(MODULE).main.ec -o $(OBJ)$(MODULE).main.c -symbols $(OBJ)
136
137 $(SYMBOLS): | objdir
138 $(OBJECTS): | objdir
139 $(TARGET): $(SOURCES) $(RESOURCES) $(SYMBOLS) $(OBJECTS) | objdir
140         $(CC) $(OFLAGS) $(OBJECTS) $(LIBS) -o $(TARGET) $(INSTALLNAME)
141         $(STRIP) $(STRIPOPT) $(TARGET)
142 ifndef WINDOWS
143 ifeq "$(TARGET_TYPE)" "executable"
144         @-$(call psep,$(UPX) $(UPXFLAGS) $(TARGET)) || $(call echo,upx not installed; not compressing.)
145 endif
146 else
147         @-$(call psep,$(UPX) $(UPXFLAGS) $(TARGET)) || $(call echo,upx not installed; not compressing.)
148 endif
149         $(EAR) awq $(TARGET) ../../ecere/res/vanilla/ecere/actions/folderNew.png ../../ecere/res/vanilla/ecere/actions/goUp.png "ecere/actions"
150         $(EAR) awq $(TARGET) ../../ecere/res/vanilla/ecere/devices/computer.png ../../ecere/res/vanilla/ecere/devices/driveHardDisk.png ../../ecere/res/vanilla/ecere/devices/driveRemovableMedia.png ../../ecere/res/vanilla/ecere/devices/mediaFloppy.png ../../ecere/res/vanilla/ecere/devices/mediaOptical.png "ecere/devices"
151         $(EAR) awq $(TARGET) ../../ecere/res/vanilla/ecere/elements/areaClose.png ../../ecere/res/vanilla/ecere/elements/areaMaximize.png ../../ecere/res/vanilla/ecere/elements/areaMinimize.png ../../ecere/res/vanilla/ecere/elements/areaRestore.png ../../ecere/res/vanilla/ecere/elements/arrowDown.png ../../ecere/res/vanilla/ecere/elements/arrowLeft.png ../../ecere/res/vanilla/ecere/elements/arrowRight.png ../../ecere/res/vanilla/ecere/elements/arrowUp.png ../../ecere/res/vanilla/ecere/elements/optionBoxDisabledSelected.png ../../ecere/res/vanilla/ecere/elements/optionBoxDown.png "ecere/elements"
152         $(EAR) awq $(TARGET) ../../ecere/res/vanilla/ecere/elements/optionBoxSelected.png ../../ecere/res/vanilla/ecere/elements/optionBoxSelectedDown.png ../../ecere/res/vanilla/ecere/elements/optionBoxUp.png "ecere/elements"
153         $(EAR) awq $(TARGET) ../../ecere/res/vanilla/ecere/places/driveRemote.png ../../ecere/res/vanilla/ecere/places/folder.png ../../ecere/res/vanilla/ecere/places/folderRemote.png ../../ecere/res/vanilla/ecere/places/networkServer.png ../../ecere/res/vanilla/ecere/places/networkWorkgroup.png "ecere/places"
154         $(EAR) awq $(TARGET) ../../ecere/res/vanilla/ecere/status/folderOpen.png "ecere/status"
155         $(EAR) awq $(TARGET) locale/zh_CN/LC_MESSAGES/extract.mo "locale/zh_CN/LC_MESSAGES"
156
157 # SYMBOL RULES
158
159 $(OBJ)extract.sym: extract.ec
160         $(ECP) $(CECFLAGS) $(ECFLAGS) $(CFLAGS) -c extract.ec -o $(OBJ)extract.sym
161
162 # C OBJECT RULES
163
164 $(OBJ)extract.c: extract.ec $(OBJ)extract.sym | $(SYMBOLS)
165         $(ECC) $(CECFLAGS) $(ECFLAGS) $(CFLAGS) $(FVISIBILITY) -c extract.ec -o $(OBJ)extract.c -symbols $(OBJ)
166
167 # IMPLICIT OBJECT RULE
168
169 $(OBJ)%$(O) : $(OBJ)%.c
170         $(CC) $(CFLAGS) $(FVISIBILITY) -c $< -o $@
171
172 # OBJECT RULES
173
174 $(OBJ)$(MODULE).main$(O): $(OBJ)$(MODULE).main.c
175         $(CC) $(CFLAGS) $(FVISIBILITY) -c $(OBJ)$(MODULE).main.c -o $(OBJ)$(MODULE).main$(O)
176
177 clean: objdir
178         $(call rmq,$(OBJ)$(MODULE).main.c $(OBJ)$(MODULE).main.ec $(OBJ)$(MODULE).main$(I) $(OBJ)$(MODULE).main$(S) $(TARGET))
179         $(call rmq,$(OBJECTS))
180         $(call rmq,$(COBJECTS))
181         $(call rmq,$(IMPORTS))
182         $(call rmq,$(SYMBOLS))
183
184 realclean:
185         $(call rmrq,$(OBJ))
186
187 distclean:
188         $(call rmrq,obj/)