Qt α׷  tmake 

 :    (ѱ װб а п )

http://esc.cl.hangkong.ac.kr/~hmask
mailto://hmask@esc.cl.hangkong.ac.kr

¥ : 2000 8 26


   Ǿ   ٲ  ϴ.   Ǿ
ٸ reposting   ֽϴ.


[1] tmake?

ҽ ϶ Makefile  ϰ ˴ϴ. Qt ̺귯
ؼ  Ҷ
ñ׳ΰ Ե ÷Ǳ 
Makefile °  ʽϴ.  Qt  Troll-Tech
Makefile   ִ tmake  մϴ.
tmake Qt̺귯 ϴ ҽ Makefile  ۼ  ְ ִ
 Դϴ.


[2] tmake ϱ

tmake  Ʈ   ֽϴ.

	http://www.troll.no/freebies/tmake.html
	ftp://ftp.troll.no/freebies/tmake


[3] tmake ġ

  tmake ֽ  1.3Դϴ.   /usr/local 丮 tmake
ġմϴ.

# cd /usr/local
# tar -xvzf tmake-1.3_tar.gz

α׷ ġ   ִ  θ  ݴϴ..

[Unix Bourne shell:]
    TMAKEPATH=/usr/local/tmake/lib/linux-g++
    PATH=$PATH:/usr/local/tmake/bin
    export TMAKEPATH PATH

[Unix C shell:]
    setenv TMAKEPATH /usr/local/tmake/lib/linux-g++
    setenv PATH $PATH:/usr/local/tmake/bin


[4] tmake  

/usr/local/tmake/lib/linux-g++ 丮 캸 tmake ȯ漳 
tmake.conf  ִ. ⼭ ϴ C Ϸ ø,
 ̺귯 θ մϴ. ⺻  Ǿ  ̳,
ȯ濡  Qt ΰ  ϰ ٸ  ֽϴ.
  ϴ C Ϸ, Qt ̺귯   ڽ ýۿ °
մϴ.   Ϻδ  ϴ.

# $Id: tmake.conf,v 1.15 1999/07/28 15:21:49 hanord Exp $
# tmake configuration for linux-g++

 TEMPLATE                = app
 CONFIG                  = qt warn_on release      
 TMAKE_CC                = gcc
 TMAKE_CFLAGS            = -pipe

 TMAKE_INCDIR_X11        = /usr/X11R6/include
 TMAKE_LIBDIR_X11        = /usr/X11R6/lib
 TMAKE_INCDIR_QT         = /usr/include/qt		#Qt  
 TMAKE_LIBDIR_QT         = /usr/lib			#Qt ̺귯 


[5] tmake Ʈ 

   ҽ  Ʈ   ô. 
   ϴ.

-------- main.cpp ------------------------------------------------------------

#include "QtEx2.h"
#include "qapplication.h"

int main( int argc, char **argv)
{
	QApplication	a( argc, argv);

	QtExample2	QtEx2;

	QObject::connect( &QtEx2, SIGNAL(quitMessage()), &a, SLOT(quit()) );
	a.setMainWidget(&QtEx2);
	QtEx2.show();

	return a.exec();
}

------------------------------------------------------------------------------

------- QtEx2.h --------------------------------------------------------------

#include "qwidget.h"
#include "qpushbutton.h"
#include "qlineedit.h"

class QtExample2 : public QWidget
{
	 Q_OBJECT
public:
	QtExample2( QWidget *parent = 0, const char *name = 0 );

public:
	QPushButton	*p_Button;
	QLineEdit	*p_Edit;
signals:
	void quitMessage();
private slots:
	void printMessage();
};

------------------------------------------------------------------------------

------- QtEx2.cpp ------------------------------------------------------------

#include "QtEx2.h"
#include "qmessagebox.h"

QtExample2::QtExample2( QWidget *parent, const char *name)
	: QWidget( parent, name)
{
	resize( 400, 300);
	
	p_Button = new QPushButton( this, "Button");
	p_Button->setGeometry( 20,50,100,40);
	p_Button->setText("Button");
	
	connect( p_Button, SIGNAL(clicked()), SLOT(printMessage()) );
	p_Edit = new QLineEdit( this, "Edit");
	p_Edit->setGeometry( 130,50,200,40);
}

void QtExample2::printMessage()
{
	QMessageBox::information(this,"Information",p_Edit->text());

	if( strcmp("quit",p_Edit->text()) == 0 )
		emit quitMessage();
}

------------------------------------------------------------------------------


 ̰  QtEx2.pro Ʈ    ϴ.

TEMPLATE        = app
CONFIG          = qt warn_on release
HEADERS         = QtEx2.h
SOURCES         = QtEx2.cpp \
                  main.cpp
TARGET          = QtEx2


/* Ķ 
 TEMPLATE : α׷(app), ̺귯(lib), 丮(subdirs) Ÿ
Ѵ.
 CONFIG     :  ʿ ϴ ̺귯  ɼ Ѵ.
 		qt : Qt ̿ ̺귯
 		x11 : X- ̺귯
 		warn_on :      ǥѴ.
 		release : ȭ Ѵ.
 		debug :   Ѵ.
 HEADERS  : ʿ  ´.
 SOURCES : ʿ ҽ ´.
 TARGET    :  α׷ ̸
*/

[6] tmake 

   tmake -o ɼ ϸ Makefile   ֽϴ.

	tmake QtExample2.pro -o Makefile

 make ϸ(ҽ   )  Ŀ  α׷
ϼ˴ϴ.

