Commit b7b02fef8d347ea307feceb6c6fb90901ca720e4
1 parent
58e14149
Exists in
master
and in
1 other branch
Reorganizando makefiles, separando melhor os módulos
Showing
3 changed files
with
223 additions
and
31 deletions
Show diff stats
@@ -0,0 +1,138 @@ | @@ -0,0 +1,138 @@ | ||
1 | +# | ||
2 | +# "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | ||
3 | +# (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | ||
4 | +# aplicativos mainframe. Registro no INPI sob o nome G3270. | ||
5 | +# | ||
6 | +# Copyright (C) <2008> <Banco do Brasil S.A.> | ||
7 | +# | ||
8 | +# Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | ||
9 | +# os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | ||
10 | +# Free Software Foundation. | ||
11 | +# | ||
12 | +# Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | ||
13 | +# GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | ||
14 | +# A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | ||
15 | +# obter mais detalhes. | ||
16 | +# | ||
17 | +# Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | ||
18 | +# programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple | ||
19 | +# Place, Suite 330, Boston, MA, 02111-1307, USA | ||
20 | +# | ||
21 | +# Contatos: | ||
22 | +# | ||
23 | +# perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | ||
24 | +# erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) | ||
25 | +# | ||
26 | + | ||
27 | +MODULE_NAME=v3270 | ||
28 | + | ||
29 | +SOURCES=marshal.c widget.c oia.c iocallback.c keyboard.c draw.c mouse.c selection.c \ | ||
30 | + accessible.c security.c macros.c hostselect.c properties.c | ||
31 | + | ||
32 | +#---[ Configuration values ]------------------------------------------------------------- | ||
33 | + | ||
34 | +PACKAGE_NAME=@PACKAGE_NAME@ | ||
35 | +PACKAGE_VERSION=@PACKAGE_VERSION@ | ||
36 | +PACKAGE_TARNAME=@PACKAGE_TARNAME@ | ||
37 | + | ||
38 | +prefix=@prefix@ | ||
39 | +exec_prefix=@exec_prefix@ | ||
40 | +bindir=@bindir@ | ||
41 | +sbindir=@sbindir@ | ||
42 | +libdir=@libdir@ | ||
43 | + | ||
44 | +BASEDIR=@BASEDIR@ | ||
45 | + | ||
46 | +OBJDIR=.obj | ||
47 | +OBJDBG=$(OBJDIR)/Debug | ||
48 | +OBJRLS=$(OBJDIR)/Release | ||
49 | + | ||
50 | +MKDIR=@MKDIR_P@ | ||
51 | +CC=@CC@ | ||
52 | +LD=@CC@ | ||
53 | +AR=@AR@ | ||
54 | + | ||
55 | +CFLAGS=@CFLAGS@ @LIB3270_CFLAGS@ -Wno-deprecated-declarations @GTK_CFLAGS@ -I$(BASEDIR)/src/include/pw3270 | ||
56 | +LIBS=@LIBS@ @GTK_LIBS@ @LIB3270_LIBS@ | ||
57 | + | ||
58 | +#---[ Rules ]---------------------------------------------------------------------------- | ||
59 | + | ||
60 | +DEPENDS=$(BASEDIR)/src/include/*.h $(BASEDIR)/src/include/lib3270/*.h $(BASEDIR)/src/include/pw3270/*.h *.h Makefile | ||
61 | + | ||
62 | +$(OBJDBG)/%.o: \ | ||
63 | + %.c \ | ||
64 | + $(DEPENDS) | ||
65 | + | ||
66 | + @echo $< ... | ||
67 | + @$(MKDIR) `dirname $@` | ||
68 | + @$(CC) $(CFLAGS) \ | ||
69 | + @DBG_CFLAGS@ \ | ||
70 | + -DBUILD_DATE=`date +"0x%Y%m%d"`\ | ||
71 | + -o $@ -c $< | ||
72 | + | ||
73 | +$(OBJRLS)/%.o: \ | ||
74 | + %.c \ | ||
75 | + $(DEPENDS) | ||
76 | + | ||
77 | + @echo $< ... | ||
78 | + @$(MKDIR) `dirname $@` | ||
79 | + @$(CC) $(CFLAGS) \ | ||
80 | + @RLS_CFLAGS@ \ | ||
81 | + -DBUILD_DATE=`date +"0x%Y%m%d"` \ | ||
82 | + -o $@ -c $< | ||
83 | + | ||
84 | +marshal.h: \ | ||
85 | + genmarshal | ||
86 | + | ||
87 | + @echo $< ... | ||
88 | + @$(MKDIR) `dirname $@` | ||
89 | + @glib-genmarshal --prefix=v3270 --header genmarshal > $@ | ||
90 | + | ||
91 | +marshal.c: \ | ||
92 | + marshal.h | ||
93 | + | ||
94 | + @echo $< ... | ||
95 | + @$(MKDIR) `dirname $@` | ||
96 | + @glib-genmarshal --prefix=v3270 --body genmarshal > $@ | ||
97 | + | ||
98 | +#---[ Release Targets ]------------------------------------------------------------------ | ||
99 | + | ||
100 | +Release: \ | ||
101 | + $(BASEDIR)/.obj/Release/$(MODULE_NAME).a | ||
102 | + | ||
103 | +$(BASEDIR)/.obj/Release/$(MODULE_NAME).a: \ | ||
104 | + $(foreach SRC, $(basename $(SOURCES)), $(OBJRLS)/$(SRC).o) | ||
105 | + | ||
106 | + @echo $@ ... | ||
107 | + @$(MKDIR) `dirname $@` | ||
108 | + @$(AR) rcs $@ $^ | ||
109 | + | ||
110 | +#---[ Debug Targets ]-------------------------------------------------------------------- | ||
111 | + | ||
112 | +Debug: \ | ||
113 | + $(BASEDIR)/.obj/Debug/$(MODULE_NAME).a | ||
114 | + | ||
115 | +$(BASEDIR)/.obj/Debug/$(MODULE_NAME).a: \ | ||
116 | + $(foreach SRC, $(basename $(SOURCES)), $(OBJDBG)/$(SRC).o) | ||
117 | + | ||
118 | + @echo $@ ... | ||
119 | + @$(MKDIR) `dirname $@` | ||
120 | + @$(AR) rcs $@ $^ | ||
121 | + | ||
122 | +#---[ Clean Targets]--------------------------------------------------------------------- | ||
123 | + | ||
124 | +cleanDebug: | ||
125 | + | ||
126 | + @rm -fr $(BASEDIR)/.obj/Debug/$(MODULE_NAME).a \ | ||
127 | + $(OBJDBG) | ||
128 | + | ||
129 | +cleanRelease: | ||
130 | + | ||
131 | + @rm -fr $(BASEDIR)/.obj/Release/$(MODULE_NAME).a \ | ||
132 | + $(OBJRLS) | ||
133 | + | ||
134 | +clean: \ | ||
135 | + cleanDebug \ | ||
136 | + cleanRelease | ||
137 | + | ||
138 | + |
sources.mak
@@ -1,31 +0,0 @@ | @@ -1,31 +0,0 @@ | ||
1 | -# | ||
2 | -# "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | ||
3 | -# (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | ||
4 | -# aplicativos mainframe. Registro no INPI sob o nome G3270. | ||
5 | -# | ||
6 | -# Copyright (C) <2008> <Banco do Brasil S.A.> | ||
7 | -# | ||
8 | -# Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | ||
9 | -# os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | ||
10 | -# Free Software Foundation. | ||
11 | -# | ||
12 | -# Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | ||
13 | -# GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | ||
14 | -# A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | ||
15 | -# obter mais detalhes. | ||
16 | -# | ||
17 | -# Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | ||
18 | -# programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple | ||
19 | -# Place, Suite 330, Boston, MA, 02111-1307, USA | ||
20 | -# | ||
21 | -# Contatos: | ||
22 | -# | ||
23 | -# perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | ||
24 | -# erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) | ||
25 | -# licinio@bb.com.br (Licínio Luis Branco) | ||
26 | -# kraucer@bb.com.br (Kraucer Fernandes Mazuco) | ||
27 | -# | ||
28 | - | ||
29 | -V3270_SRC=marshal.c widget.c oia.c iocallback.c keyboard.c draw.c mouse.c selection.c \ | ||
30 | - accessible.c security.c macros.c hostselect.c properties.c | ||
31 | - |
@@ -0,0 +1,85 @@ | @@ -0,0 +1,85 @@ | ||
1 | +<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> | ||
2 | +<CodeBlocks_project_file> | ||
3 | + <FileVersion major="1" minor="6" /> | ||
4 | + <Project> | ||
5 | + <Option title="3270 terminal widget for gtk" /> | ||
6 | + <Option makefile_is_custom="1" /> | ||
7 | + <Option pch_mode="2" /> | ||
8 | + <Option compiler="gcc" /> | ||
9 | + <Build> | ||
10 | + <Target title="Debug"> | ||
11 | + <Option output=".bin/Debug/3270 terminal widget for gtk" prefix_auto="1" extension_auto="1" /> | ||
12 | + <Option object_output=".obj/Debug/" /> | ||
13 | + <Option type="1" /> | ||
14 | + <Option compiler="gcc" /> | ||
15 | + <Compiler> | ||
16 | + <Add option="-g" /> | ||
17 | + </Compiler> | ||
18 | + </Target> | ||
19 | + <Target title="Release"> | ||
20 | + <Option output=".bin/Release/3270 terminal widget for gtk" prefix_auto="1" extension_auto="1" /> | ||
21 | + <Option object_output=".obj/Release/" /> | ||
22 | + <Option type="1" /> | ||
23 | + <Option compiler="gcc" /> | ||
24 | + <Compiler> | ||
25 | + <Add option="-O2" /> | ||
26 | + </Compiler> | ||
27 | + <Linker> | ||
28 | + <Add option="-s" /> | ||
29 | + </Linker> | ||
30 | + </Target> | ||
31 | + </Build> | ||
32 | + <Compiler> | ||
33 | + <Add option="-Wall" /> | ||
34 | + </Compiler> | ||
35 | + <Unit filename="accessible.c"> | ||
36 | + <Option compilerVar="CC" /> | ||
37 | + </Unit> | ||
38 | + <Unit filename="accessible.h" /> | ||
39 | + <Unit filename="draw.c"> | ||
40 | + <Option compilerVar="CC" /> | ||
41 | + </Unit> | ||
42 | + <Unit filename="hostselect.c"> | ||
43 | + <Option compilerVar="CC" /> | ||
44 | + </Unit> | ||
45 | + <Unit filename="hostselect.h" /> | ||
46 | + <Unit filename="iocallback.c"> | ||
47 | + <Option compilerVar="CC" /> | ||
48 | + </Unit> | ||
49 | + <Unit filename="keyboard.c"> | ||
50 | + <Option compilerVar="CC" /> | ||
51 | + </Unit> | ||
52 | + <Unit filename="macros.c"> | ||
53 | + <Option compilerVar="CC" /> | ||
54 | + </Unit> | ||
55 | + <Unit filename="marshal.c"> | ||
56 | + <Option compilerVar="CC" /> | ||
57 | + </Unit> | ||
58 | + <Unit filename="marshal.h" /> | ||
59 | + <Unit filename="mouse.c"> | ||
60 | + <Option compilerVar="CC" /> | ||
61 | + </Unit> | ||
62 | + <Unit filename="oia.c"> | ||
63 | + <Option compilerVar="CC" /> | ||
64 | + </Unit> | ||
65 | + <Unit filename="private.h" /> | ||
66 | + <Unit filename="properties.c"> | ||
67 | + <Option compilerVar="CC" /> | ||
68 | + </Unit> | ||
69 | + <Unit filename="security.c"> | ||
70 | + <Option compilerVar="CC" /> | ||
71 | + </Unit> | ||
72 | + <Unit filename="selection.c"> | ||
73 | + <Option compilerVar="CC" /> | ||
74 | + </Unit> | ||
75 | + <Unit filename="widget.c"> | ||
76 | + <Option compilerVar="CC" /> | ||
77 | + </Unit> | ||
78 | + <Extensions> | ||
79 | + <code_completion /> | ||
80 | + <envvars /> | ||
81 | + <debugger /> | ||
82 | + <lib_finder disable_auto="1" /> | ||
83 | + </Extensions> | ||
84 | + </Project> | ||
85 | +</CodeBlocks_project_file> |