Makefile 300 B

1234567891011121314151617181920
  1. ERR = $(shell which gcc; echo $$?)
  2. ifeq "$(ERR)" "0"
  3. CC = gcc
  4. else
  5. CC = clang
  6. endif
  7. CFLAGS = -O2 -march=native -pipe -Wall -Wextra
  8. all: 1-rgb565 2-rle
  9. 1-rgb565: 1-rgb565.c
  10. $(CC) $(CFLAGS) -o 1-rgb565 1-rgb565.c
  11. 2-rle: 2-rle.c
  12. $(CC) $(CFLAGS) -o 2-rle 2-rle.c
  13. clean:
  14. rm 1-rgb565 2-rle