CFLAGS := -O2 -Wall all: gen_image split_image untrx trx split_linux gen_image: gen_image.o crc.o gcc gen_image.o crc.o -o gen_image gen_image.o: gen_image.c gcc $(CFLAGS) -I. -c gen_image.c crc.o: crc.c gcc $(CFLAGS) -c crc.c split_image: split_image.c gcc $(CFLAGS) -I. split_image.c -o split_image trx: trx.o crc.o gcc trx.o crc.o -o trx trx.o: trx.c gcc $(CFLAGS) -I. -c trx.c untrx: untrx.c gcc $(CFLAGS) -I. untrx.c -o untrx split_linux: split_linux.c gcc $(CFLAGS) -I. split_linux.c -o split_linux clean: rm -f *.o gen_image split_image trx untrx split_linux dist: tar -czf image-tools.tar.gz Makefile *.c *.h testcrc: trx ./trx.org trx.o | xxd > _test1.hex ./trx trx.o | xxd > _test2.hex diff _test1.hex _test2.hex