Replaced plain old make with qmake. (Note: qmake has no idea how to build the loader, but that doesn't really need to be changed)

Started a gui in Qt.
This commit is contained in:
Scott Mansell 2011-10-17 18:48:54 +13:00
parent 7afe0e9822
commit 871f2d3142
4 changed files with 38 additions and 16 deletions

View file

@ -1,16 +0,0 @@
CFLAGS = -g -O2 -Wall
LIBS = -lpthread
all: kvmbox loader
kvmbox: main.c kvmbox.o smbus.o pci.o
gcc $(CFLAGS) $(LIBS) main.c kvmbox.o smbus.o pci.o -o kvmbox
loader: loader.asm
nasm loader.asm
clean:
rm *.o kvmbox
run: kvmbox
./kvmbox BIOSs/mine/2bl.img BIOSs/mine/bios.bin

21
gui.cpp Normal file
View file

@ -0,0 +1,21 @@
#include <QtGui>
int main(int argv, char **args) {
QApplication app(argv, args);
QTextEdit *textEdit = new QTextEdit;
QPushButton *quitButton = new QPushButton("Quit");
QObject::connect(quitButton, SIGNAL(clicked()), qApp, SLOT(quit()));
QVBoxLayout *layout = new QVBoxLayout();
layout->addWidget(textEdit);
layout->addWidget(quitButton);
QWidget window;
window.setLayout(layout);
window.show();
return app.exec();
}

BIN
loader Normal file

Binary file not shown.

17
xbox.pro Normal file
View file

@ -0,0 +1,17 @@
######################################################################
# Automatically generated by qmake (2.01a) Mon Oct 17 18:26:57 2011
######################################################################
TEMPLATE = app
TARGET = kvmbox
DEPENDPATH += .
INCLUDEPATH += .
# Input
HEADERS += kvmbox.h
SOURCES += gui.cpp kvmbox.c pci.c smbus.c
nogui {
SOURCES = main.c kvmbox.c pci.c smbus.c
}