# Makefile - Don Yang (uguu.org)
#
# 04/26/08

TARGET = maka.exe
COMPRESS_UTIL = compress.exe
DECOMPRESS_TEST = decompress.exe

all: $(TARGET) $(COMPRESS_UTIL) $(DECOMPRESS_TEST)

$(TARGET): maka.c
	gcc -Wall -ansi -pedantic $< -o $@

$(COMPRESS_UTIL): compress.c
	gcc -Wall -ansi -pedantic -finline-functions -O3 $< -o $@

$(DECOMPRESS_TEST): decompress.c
	gcc $< -o $@

test: $(TARGET)
	./test.sh

clean:
	-rm -f $(TARGET) $(COMPRESS_UTIL) $(DECOMPRESS_TEST)

backup:
	-rm -f backup.tar.gz
	tar cf backup.tar *.c *.pl *.sh *.txt Makefile
	gzip -9 backup.tar
