From 041f7e889909bc9bc23f54c7ff8521e2dfe82183 Mon Sep 17 00:00:00 2001 From: yuzu-eva Date: Fri, 11 Apr 2025 16:59:21 +0200 Subject: separated files and changed if-else to switch-case in main --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 0676ea5..5a0a267 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ SHELL=/bin/sh CC=gcc -SRCDIR=. +SRCDIR=./src PREFIX=/usr/local BINDIR=/bin @@ -14,14 +14,18 @@ BIN=myal all: $(BIN) -myal: $(SRCDIR)/main.c - $(CC) $(CFLAGS) $(LIBS) $(SRCDIR)/main.c -o myal +myal: $(SRCDIR)/main.c dbhandling + $(CC) $(CFLAGS) $(LIBS) $(SRCDIR)/main.c dbhandling.o -o myal + +dbhandling: $(SRCDIR)/dbhandling.c + $(CC) $(CFLAGS) $(LIBS) -c $(SRCDIR)/dbhandling.c install: $(INSTALL_PROGRAM) myal $(PREFIX)$(BINDIR)/myal clean: $(RM) myal + $(RM) dbhandling.o uninstall: $(RM) /usr/local/bin/myal -- cgit v1.2.3