2016-11-01 23:59:48 +03:00
|
|
|
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
|
2016-10-28 00:49:04 +03:00
|
|
|
|
|
|
|
all: zip.dll build_creator.c
|
2016-11-01 23:59:48 +03:00
|
|
|
ifeq ($(shell uname), Linux)
|
|
|
|
./$(TARGET)
|
|
|
|
else
|
|
|
|
$(TARGET)
|
|
|
|
endif
|
2016-10-28 00:49:04 +03:00
|
|
|
|
|
|
|
zip.dll:
|
2016-11-01 23:59:48 +03:00
|
|
|
ifeq ($(OS),Windows_NT)
|
2016-10-28 00:49:04 +03:00
|
|
|
$(CC) /LD ../zip/src/zip.c /zip.dll
|
2016-11-01 23:59:48 +03:00
|
|
|
else
|
|
|
|
ifeq ($(shell uname), Linux)
|
|
|
|
$(CC) -c ../zip/src/zip.c -o zip.dll
|
|
|
|
endif
|
|
|
|
endif
|
2016-10-28 00:49:04 +03:00
|
|
|
|
|
|
|
build_creator.c:
|
2016-11-01 23:59:48 +03:00
|
|
|
ifeq ($(OS),Windows_NT)
|
2016-10-28 00:49:04 +03:00
|
|
|
$(CC) build-creator.c zip.obj
|
2016-11-01 23:59:48 +03:00
|
|
|
else
|
|
|
|
ifeq ($(shell uname), Linux)
|
|
|
|
$(CC) build-creator.c zip.dll -o $(TARGET)
|
|
|
|
endif
|
|
|
|
endif
|
2016-10-28 00:49:04 +03:00
|
|
|
|
|
|
|
clean:
|
2016-11-01 23:59:48 +03:00
|
|
|
$(RM) *.obj
|
|
|
|
$(RM) $(TARGET)
|
|
|
|
$(RM) zip.dll
|
|
|
|
$(RM) *.zip
|