Hello world is working

This commit is contained in:
2022-09-18 07:48:06 +01:00
parent c61cd4b86c
commit 803bec8ea4
6 changed files with 186 additions and 0 deletions

44
makefile Normal file
View File

@@ -0,0 +1,44 @@
export OUTDIR = out
export LIBDIR = lib
export TOY_OUTDIR = ../$(LIBDIR)
all: $(OUTDIR) $(LIBDIR) toy
$(MAKE) -C source
cp $(LIBDIR)/*.dll $(OUTDIR)
toy: $(LIBDIR)
$(MAKE) -C Toy/source
$(OUTDIR):
mkdir $(OUTDIR)
$(LIBDIR):
mkdir $(LIBDIR)
.PHONY: clean
clean:
ifeq ($(findstring CYGWIN, $(shell uname)),CYGWIN)
find . -type f -name '*.o' -exec rm -f -r -v {} \;
find . -type f -name '*.a' -exec rm -f -r -v {} \;
find . -type f -name '*.exe' -exec rm -f -r -v {} \;
find . -type f -name '*.dll' -exec rm -f -r -v {} \;
find . -type f -name '*.lib' -exec rm -f -r -v {} \;
find . -type f -name '*.so' -exec rm -f -r -v {} \;
find . -empty -type d -delete
else ifeq ($(shell uname),Linux)
find . -type f -name '*.o' -exec rm -f -r -v {} \;
find . -type f -name '*.a' -exec rm -f -r -v {} \;
find . -type f -name '*.exe' -exec rm -f -r -v {} \;
find . -type f -name '*.dll' -exec rm -f -r -v {} \;
find . -type f -name '*.lib' -exec rm -f -r -v {} \;
find . -type f -name '*.so' -exec rm -f -r -v {} \;
rm -rf out
find . -empty -type d -delete
else ifeq ($(OS),Windows_NT)
$(RM) *.o *.a *.exe
else
@echo "Deletion failed - what platform is this?"
endif
rebuild: clean all