kbhit

cat kbhit.cpp
// kbhit.cpp
// console application

#using <mscorlib.dll>
#using <System.dll>

using namespace System;

#include "kbhit.h"

int main(array<System::String ^> ^args){
	Console::WriteLine("HelloWorld\n");
	Console::ReadKey (true); // supress echo
	return EXIT_SUCCESS;
}

cat makefile
# makefile for kbhit
# console application

.PHONY: all test mmm clean 
.SUFFIXES: .exe .obj .txt .resources .dll

TARGET=kbhit

CULTUREDIRS=
DLLS=

all: $(TARGET).exe $(DLLS)


LOPT=

OBJS=$(TARGET).obj AssemblyInfo.obj

$(TARGET).obj: $(TARGET).cpp


AssemblyInfo.obj: AssemblyInfo.cpp

meta: $(TARGET).exe
	ILDasm /out:$@ /metadata $<

$(TARGET).exe: $(OBJS)  
	link $(LOPT) $^ 

.cpp.obj:
	cl -c -Wall -Od -clr:safe $<

test: $(TARGET).exe
	./$(TARGET).exe 

clean:
	@-rm $(TARGET).exe *.obj *~ $(TARGET).exe.manifest 1>/dev/null 2>&1
	@-rm *.resources 1>/dev/null 2>&1
	@-rm -fr $(CULTUREDIRS)

mmm:
	cat $(TARGET).cpp
	cat AssemblyInfo.cpp
	@echo
	cat makefile

html:
	cat /dev/clipboard | code2html.exe | unix2dos

install: $(TARGET).exe
	cp $(TARGET).exe ~/bin
	cp $(TARGET).exe.manifest ~/bin