From 562483823c8fbe9f36c0a30ee0aa0eda731937f9 Mon Sep 17 00:00:00 2001 From: Ansa89 Date: Tue, 24 Jun 2014 11:53:02 +0200 Subject: [PATCH] Makefile: move to "build/" --- {src => build}/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename {src => build}/Makefile (95%) diff --git a/src/Makefile b/build/Makefile similarity index 95% rename from src/Makefile rename to build/Makefile index ba6dbc4..0eb7cd9 100644 --- a/src/Makefile +++ b/build/Makefile @@ -6,6 +6,7 @@ LIBS = libtoxcore ncurses CFLAGS ?= $(USER_CFLAGS) -DTOXICVER="\"$(VERSION)\"" -std=gnu99 -pthread LDFLAGS ?= $(USER_LDFLAGS) +SRC_DIR = ../src DESTDIR ?= /usr/local OBJ = chat.o chat_commands.o configdir.o dns.o execute.o @@ -87,9 +88,9 @@ install: toxic mkdir -pv $(DESTDIR)/bin install -m 0755 toxic $(DESTDIR)/bin -%.o: %.c - $(CC) $(CFLAGS) -o $*.o -c $*.c - $(CC) -MM $(CFLAGS) $*.c > $*.d +%.o: $(SRC_DIR)/%.c + $(CC) $(CFLAGS) -o $*.o -c $(SRC_DIR)/$*.c + $(CC) -MM $(CFLAGS) $(SRC_DIR)/$*.c > $*.d clean: rm -rf *.d *.o toxic