Makefile 795 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # SlideScript makefile
  2. # (C) Copyright 2014-2022 Chris Dorman, some rights reserved (GPLv2)
  3. # Some changes and tweaks from Menchers
  4. VERSION = \"0.7.2\"
  5. VERSION_EXTRA = \"$(EXTRA)\"
  6. PREFIX ?= /usr
  7. #CC ?= musl-gcc
  8. CC ?= gcc
  9. #CC ?= tcc
  10. #CC ?= musl-tcc
  11. CFLAGS += -O3 -g -Wall -Wextra
  12. CPPFLAGS += -DVERSION=$(VERSION) -D_FORTIFY_SOURCE=2
  13. #CPPFLAGS += -DVERSION=$(VERSION)
  14. LDFLAGS += -lm
  15. BIN ?= slidescript
  16. SRCS=$(wildcard src/lz78/*.c) $(wildcard src/*.c)
  17. OBJECTS=$(SRCS:%.c=%.o)
  18. all: main
  19. fresh: clean all
  20. .c.o:
  21. $(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
  22. main: $(OBJECTS)
  23. $(CC) $(OBJECTS) -o $(BIN) $(LDFLAGS) $(CFLAGS)
  24. clean:
  25. rm -f $(OBJECTS) $(BIN)
  26. install:
  27. install -D $(BIN) $(DESTDIR)/$(PREFIX)/bin/$(BIN)