From 6cd6fab90faf1fe1a9c7a5fa9e1df6dac6c579f0 Mon Sep 17 00:00:00 2001 From: Brett Weir Date: Thu, 19 Feb 2015 21:57:00 -0800 Subject: [PATCH] Added qmake project files to repository; updated README and changed name so it would show up on GitHub; fixed permissions on enumcom.c --- README.md | 42 +++++++++++++++++++++++++++++++++++++++ enumcom.c | 0 qmake/.gitignore | 4 ++++ qmake/eeprom/eeprom.pro | 9 +++++++++ qmake/p1load.pri | 16 +++++++++++++++ qmake/p1load.pro | 9 +++++++++ qmake/p1load/p1load.pro | 9 +++++++++ qmake/ploader/ploader.pro | 37 ++++++++++++++++++++++++++++++++++ readme.txt | 17 ---------------- 9 files changed, 126 insertions(+), 17 deletions(-) create mode 100644 README.md mode change 100755 => 100644 enumcom.c create mode 100644 qmake/.gitignore create mode 100644 qmake/eeprom/eeprom.pro create mode 100644 qmake/p1load.pri create mode 100644 qmake/p1load.pro create mode 100644 qmake/p1load/p1load.pro create mode 100644 qmake/ploader/ploader.pro delete mode 100644 readme.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..9cdfed5 --- /dev/null +++ b/README.md @@ -0,0 +1,42 @@ +# p1load + +p1load is a tiny, nimble cross-platform loader library for the Propeller microcontroller. + +## Building + +`p1load` can be built in multiple ways. + +### GNU Make + +Building using plain old `make` is straight-forward. To build for the various platforms, +specify the target operating system using the `OS` variable. + +``` +OS=macosx make +``` + +Possible options: + +* Mac OS X: `OS=macosx` +* Linux: `OS=linux` +* Raspberry Pi: `OS=raspberrypi` +* Windows MinGW: `OS=msys` + +If no platform is specified, the default `macosx` is used. + +### qmake + +`qmake` project files can be found in the `qmake/` directory. + +``` +cd qmake +qmake +make +``` + +`qmake` will automatically build in platform-specific features except +for Raspberry Pi. Pass `CPU=armhf` to `qmake` to enable GPIO support for Raspberry Pi. + +``` +qmake CPU=armhf +``` diff --git a/enumcom.c b/enumcom.c old mode 100755 new mode 100644 diff --git a/qmake/.gitignore b/qmake/.gitignore new file mode 100644 index 0000000..96d83d2 --- /dev/null +++ b/qmake/.gitignore @@ -0,0 +1,4 @@ +Makefile +eeprom/eeprom +p1load/p1load +ploader/ploader diff --git a/qmake/eeprom/eeprom.pro b/qmake/eeprom/eeprom.pro new file mode 100644 index 0000000..bd30cc5 --- /dev/null +++ b/qmake/eeprom/eeprom.pro @@ -0,0 +1,9 @@ +include(../p1load.pri) + +TEMPLATE = app +TARGET = eeprom + +LIBS += -L$${OUT_PWD}/../ploader/ -lploader + +SOURCES += \ + ../../eeprom.c \ diff --git a/qmake/p1load.pri b/qmake/p1load.pri new file mode 100644 index 0000000..a8b3edc --- /dev/null +++ b/qmake/p1load.pri @@ -0,0 +1,16 @@ +!greaterThan(QT_MAJOR_VERSION, 4): { + error("PropellerIDE requires Qt5.2 or greater") +} +!greaterThan(QT_MINOR_VERSION, 1): { + error("PropellerIDE requires Qt5.2 or greater") +} + +CONFIG -= qt debug_and_release app_bundle +CONFIG += console + +INCLUDEPATH += ../.. + +isEmpty(VERSION_ARG):VERSION_ARG = 0.0.0 +VERSION_ARG = '\\"$${VERSION_ARG}\\"' +DEFINES += VERSION=\"$${VERSION_ARG}\" + diff --git a/qmake/p1load.pro b/qmake/p1load.pro new file mode 100644 index 0000000..cee2459 --- /dev/null +++ b/qmake/p1load.pro @@ -0,0 +1,9 @@ +TEMPLATE = subdirs + +SUBDIRS = \ + ploader \ + eeprom \ + p1load \ + +eeprom.depends = ploader +p1load.depends = ploader diff --git a/qmake/p1load/p1load.pro b/qmake/p1load/p1load.pro new file mode 100644 index 0000000..94d5c47 --- /dev/null +++ b/qmake/p1load/p1load.pro @@ -0,0 +1,9 @@ +include(../p1load.pri) + +TEMPLATE = app +TARGET = p1load + +LIBS += -L$${OUT_PWD}/../ploader/ -lploader + +SOURCES += \ + ../../p1load.c \ diff --git a/qmake/ploader/ploader.pro b/qmake/ploader/ploader.pro new file mode 100644 index 0000000..f771b6b --- /dev/null +++ b/qmake/ploader/ploader.pro @@ -0,0 +1,37 @@ +include(../p1load.pri) + +TEMPLATE = lib +TARGET = ploader +CONFIG += staticlib + +SOURCES += \ + ../../ploader.c \ + ../../packet.c \ + ../../port.c \ + +HEADERS += \ + ../../ploader.h + +unix:!macx { + DEFINES += LINUX + SOURCES += \ + ../../osint_linux.c + + equals(CPU, armhf) { + DEFINES += RASPBERRY_PI + SOURCES += \ + ../../gpio_sysfs.c + } +} +macx { + DEFINES += MACOSX + SOURCES += \ + ../../osint_linux.c +} +win32 { + DEFINES += MINGW + LIBS += -lsetupapi + SOURCES += \ + ../../osint_mingw.c \ + ../../enumcom.c +} diff --git a/readme.txt b/readme.txt deleted file mode 100644 index 7a9163f..0000000 --- a/readme.txt +++ /dev/null @@ -1,17 +0,0 @@ -To build for the various platforms: - -For Macintosh OS X: - - OS=macosx make - -For Linux: - - OS=linux make - -For the RaspberryPi: - - OS=raspberrypi make - -For Windows under MinGW: - - OS=msys make