Complete Smokester's Crater

This commit is contained in:
2016-11-01 23:59:48 +03:00
parent 371c3d00a7
commit 5e7957bac2
5 changed files with 75 additions and 31 deletions

View File

@@ -1,5 +1,6 @@
*.exe
build-creator*
*.zip
*.obj
*.dll
*.ini
*.sav

View File

@@ -1,16 +1,42 @@
CC=cl
ifeq ($(OS),Windows_NT)
RM = $(RM)
CC = cl
TARGET = build-creator.exe
else
ifeq ($(shell uname), Linux)
RM = rm -f
CC = gcc -O2
TARGET = build-creator
endif
endif
all: zip.dll build_creator.c
build-creator.exe
ifeq ($(shell uname), Linux)
./$(TARGET)
else
$(TARGET)
endif
zip.dll:
ifeq ($(OS),Windows_NT)
$(CC) /LD ../zip/src/zip.c /zip.dll
else
ifeq ($(shell uname), Linux)
$(CC) -c ../zip/src/zip.c -o zip.dll
endif
endif
build_creator.c:
ifeq ($(OS),Windows_NT)
$(CC) build-creator.c zip.obj
else
ifeq ($(shell uname), Linux)
$(CC) build-creator.c zip.dll -o $(TARGET)
endif
endif
clean:
del *.obj
del *.exe
del zip.dll
del *.zip
$(RM) *.obj
$(RM) $(TARGET)
$(RM) zip.dll
$(RM) *.zip