mirror of
https://github.com/Michaelangel007/c2t.git
synced 2024-11-16 02:04:32 +00:00
merged windows cross build makefile with main makefile, updated test scripts and docs to support change
This commit is contained in:
parent
0960c1e566
commit
122d72b905
13
Makefile
13
Makefile
@ -1,7 +1,12 @@
|
||||
|
||||
WIN32GCC = /usr/local/gcc-4.8.0-qt-4.8.4-for-mingw32/win32-gcc/bin/i586-mingw32-gcc
|
||||
|
||||
all: c2t c2t-96h
|
||||
|
||||
windows: c2t.exe c2t-96h.exe
|
||||
|
||||
dist: all windows
|
||||
|
||||
clean:
|
||||
rm c2t.h c2t c2t-96h
|
||||
cd asm; make clean
|
||||
@ -12,8 +17,14 @@ c2t: c2t.c c2t.h
|
||||
c2t-96h: c2t-96h.c c2t.h
|
||||
gcc -Wall -Wno-unused-value -Wno-unused-function -I. -O3 -o c2t-96h c2t-96h.c
|
||||
|
||||
c2t.exe: c2t.c c2t.h
|
||||
$(WIN32GCC) -Wall -Wno-unused-value -Wno-unused-function -I. -O3 -o c2t.exe c2t.c
|
||||
|
||||
c2t-96h.exe: c2t-96h.c c2t.h
|
||||
$(WIN32GCC) -Wall -Wno-unused-value -Wno-unused-function -I. -O3 -o c2t-96h.exe c2t-96h.c
|
||||
|
||||
c2t.h: mon/dos33.boot1.mon mon/dos33.boot2.mon asm/autoload.s asm/diskload2.s asm/diskload3.s asm/diskload8000.s asm/diskload9600.s asm/fastload8000.s asm/fastload9600.s asm/fastloadcd.s asm/inflate.s
|
||||
./makeheader
|
||||
|
||||
test: c2t-96h
|
||||
test: c2t-96h c2t-96h.exe
|
||||
./test.sh
|
||||
|
42
README.md
42
README.md
@ -1,5 +1,7 @@
|
||||
## Use c2t-96h version, see below
|
||||
|
||||
> Any place you read `c2t`, substitute `c2t-96h` for now.
|
||||
|
||||
## Introduction
|
||||
|
||||
`c2t` is a command line tool that can convert binary code/data and/or Apple-1/II Monitor text, as well as 140K disk images, into audio files suitable for use with the Apple-1 and II (II, II+, //e) cassette interface.
|
||||
@ -44,7 +46,7 @@ git clone https://github.com/datajerk/c2t.git
|
||||
|
||||
Download <https://github.com/datajerk/c2t/archive/master.zip> and extract.
|
||||
|
||||
Both the archive and the repo contain an OS/X 64-bit binary (`c2t`) as well as a Windows binary (`windows/c2t.exe`). Just copy to the to any directory in your path. OS/X users may need to adjust the permissions, e.g.:
|
||||
Both the archive and the repo contain an OS/X 64-bit binary (`c2t`) as well as a Windows binary (`c2t.exe`). Just copy to the to any directory in your path. OS/X users may need to adjust the permissions, e.g.:
|
||||
```
|
||||
cp c2t /usr/local/bin
|
||||
chmod 755 /usr/local/bin/c2t
|
||||
@ -56,24 +58,34 @@ make clean
|
||||
make
|
||||
```
|
||||
|
||||
To build for/from Windows, first install MinGW (<http://www.mingw.org/>), then type from the root of this distribution:
|
||||
To build from Windows, first install MinGW (<http://www.mingw.org/>), then type from the root of this distribution:
|
||||
```
|
||||
PATH=C:\MinGW\bin;%PATH%
|
||||
cd windows
|
||||
copy ..\c2t.*
|
||||
copy ..\fake6502.h
|
||||
gcc -Wall -O3 -static -o c2t c2t.c
|
||||
```
|
||||
> Use the `miniz.h` in the `windows` directory.
|
||||
|
||||
To cross build for Windows from OS/X, first install <http://crossgcc.rts-software.org/doku.php?id=compiling_for_win32>, then type:
|
||||
```
|
||||
cd windows
|
||||
cp ../c2t.*
|
||||
cp ../fake6502.h
|
||||
/usr/local/gcc-4.8.0-qt-4.8.4-for-mingw32/win32-gcc/bin/i586-mingw32-gcc -Wall -Wno-unused-value -Wno-unused-function -O3 -static -o c2t.exe c2t.c
|
||||
gcc -Wall -Wno-unused-value -Wno-unused-function -O3 -static -o c2t c2t.c
|
||||
```
|
||||
|
||||
To cross build for Windows from OS/X, first install <http://crossgcc.rts-software.org/download/gcc-4.8.0-qt-4.8.4-win32/gcc-4.8.0-qt-4.8.4-for-mingw32.dmg>, then type:
|
||||
```
|
||||
make windows
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
Automated testing is only supported on OS/X and requires the following:
|
||||
|
||||
|
||||
* Virtual ][ (<http://http://www.virtualii.com/>)
|
||||
* `zork.dsk` (May be found as `zork_i.dsk`, in any case save as `zork.dsk`)
|
||||
* `dangerous_dave.po` (You can find this on Asimov as `dangerous_dave.dsk`, but it's really a PO ordered file, just rename to `.po`.)
|
||||
* Windows cross-compiling tools <http://crossgcc.rts-software.org/download/gcc-4.8.0-qt-4.8.4-win32/gcc-4.8.0-qt-4.8.4-for-mingw32.dmg>
|
||||
* Wine (<http://winehq.org>) installed in `~/wine` (extract the tarball in `~/wine` and move the contents of `~/wine/usr` to `~/wine`, or change the path to `wine` in `test.sh`).
|
||||
|
||||
> You can hack `test.sh` if you do not want to test Windows binaries or want to use different disk images for test.
|
||||
|
||||
To test, type:
|
||||
```
|
||||
make test
|
||||
```
|
||||
|
||||
## c2t-96h Version
|
||||
|
||||
|
@ -69,7 +69,11 @@ Bugs:
|
||||
|
||||
*/
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include "miniz_win32.h"
|
||||
#else
|
||||
#include "miniz.h"
|
||||
#endif
|
||||
#include <fake6502.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
Binary file not shown.
5
c2t.c
5
c2t.c
@ -69,7 +69,12 @@ Bugs:
|
||||
|
||||
*/
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include "miniz_win32.h"
|
||||
#else
|
||||
#include "miniz.h"
|
||||
#endif
|
||||
|
||||
#include <fake6502.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
Binary file not shown.
2
test.sh
2
test.sh
@ -27,7 +27,7 @@ dsk_test()
|
||||
|
||||
PATH=~/wine/bin:$PATH
|
||||
|
||||
CMD=("./c2t-96h" "wine windows/c2t-96h")
|
||||
CMD=("./c2t-96h" "wine c2t-96h.exe")
|
||||
|
||||
for i in zork.dsk dangerous_dave.po
|
||||
do
|
||||
|
@ -1,20 +0,0 @@
|
||||
|
||||
|
||||
CC = /usr/local/gcc-4.8.0-qt-4.8.4-for-mingw32/win32-gcc/bin/i586-mingw32-gcc
|
||||
|
||||
all: c2t.exe c2t-96h.exe
|
||||
|
||||
clean:
|
||||
rm -f c2t.exe c2t-96h.exe c2t.c c2t-96h.c
|
||||
|
||||
c2t.exe: c2t.c ../c2t.h ../fake6502.h miniz.h
|
||||
$(CC) -Wall -Wno-unused-value -Wno-unused-function -O3 -I.. -o c2t.exe c2t.c
|
||||
|
||||
c2t-96h.exe: c2t-96h.c ../c2t.h ../fake6502.h miniz.h
|
||||
$(CC) -Wall -Wno-unused-value -Wno-unused-function -O3 -I.. -o c2t-96h.exe c2t-96h.c
|
||||
|
||||
c2t.c: ../c2t.c
|
||||
cp ../c2t.c .
|
||||
|
||||
c2t-96h.c: ../c2t-96h.c
|
||||
cp ../c2t-96h.c .
|
4679
windows/miniz.h
4679
windows/miniz.h
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user