Makefile 349 B

1234567891011121314151617181920212223242526
  1. # Makefile - (C) Chris Dorman, 2022 <cddo@riseup.net>
  2. PREFIX = /usr/local
  3. CC = gcc
  4. CFLAGS = -O2
  5. LDFLAGS =
  6. BIN=openedit
  7. SRCS=$(wildcard src/*.c)
  8. OBJECTS=$(SRCS:%.c=%.o)
  9. all: main
  10. fresh: clean all
  11. main: $(OBJECTS)
  12. $(CC) $(OBJECTS) -o $(BIN) $(LDFLAGS) $(CFLAGS)
  13. clean:
  14. rm -f $(OBJECTS) $(BIN)
  15. install:
  16. cp $(BIN) $(PREFIX)/bin/$(BIN)