commit 544607481e0d7f0a5b595fd4c30d0481e46a446b parent 0d97cdf38fdc3c96e00f8ce85169b0a08351cf3a Author: Demonstrandum <moi@knutsen.co> Date: Mon, 29 Jun 2020 17:36:43 +0100 God I hate Ubuntu. Diffstat:
M | Makefile | | | 23 | ++++++++++++----------- |
1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile @@ -2,7 +2,7 @@ CC := gcc OPT := -O3 WARN := -Wall -Wpedantic -Wextra -Wshadow -fcompare-debug-second LINKS := -lm -lreadline -CFLAGS := $(WARN) $(OPT) $(LINKS) +CFLAGS := $(WARN) $(OPT) TARGET := crepl OBJS := main.o defaults.o error.o parse.o displays.o builtin.o execute.o prelude.o @@ -16,10 +16,11 @@ all: clean $(TARGET) debug: CFLAGS := $(WARN) -Og debug: $(OBJS) - $(CC) -Og -o $(TARGET) $(LINKS) $(OBJS) + $(CC) -Og -o $(TARGET) $(OBJS) $(LINKS) $(TARGET): $(OBJS) - $(CC) $(OPT) -o $(TARGET) $(LINKS) $(OBJS) + $(CC) $(OPT) -o $(TARGET) $(OBJS) $(LINKS) + install: $(TARGET) @echo "Installing to $(PREFIX)/bin/$(TARGET)." @@ -27,28 +28,28 @@ install: $(TARGET) install -m 755 $(TARGET) $(PREFIX)/bin main.o: defaults.o parse.o error.o - $(CC) -c $(CFLAGS) src/main.c + $(CC) -c $(CFLAGS) src/main.c $(LINKS) defaults.o: error.o - $(CC) -c $(CFLAGS) src/defaults.c + $(CC) -c $(CFLAGS) src/defaults.c $(LINKS) prelude.o: - $(CC) -c $(CFLAGS) src/prelude.c + $(CC) -c $(CFLAGS) src/prelude.c $(LINKS) parse.o: error.o - $(CC) -c $(CFLAGS) src/parse.c + $(CC) -c $(CFLAGS) src/parse.c $(LINKS) displays.o: parse.o - $(CC) -c $(CFLAGS) src/displays.c + $(CC) -c $(CFLAGS) src/displays.c $(LINKS) builtin.o: - $(CC) -c $(CFLAGS) src/builtin.c + $(CC) -c $(CFLAGS) src/builtin.c $(LINKS) execute.o: parse.o error.o prelude.o - $(CC) -c $(CFLAGS) src/execute.c + $(CC) -c $(CFLAGS) src/execute.c $(LINKS) error.o: - $(CC) -c $(CFLAGS) src/error.c + $(CC) -c $(CFLAGS) src/error.c $(LINKS) clean: @echo "Cleaning previous build."