From 2a1885bab421e3e698bac1507f2bb855d0550b79 Mon Sep 17 00:00:00 2001 From: "Nicholas J. Kain" Date: Tue, 12 Jul 2011 18:45:29 -0400 Subject: [PATCH] Move the objs directory underneath the build directory when building with the Makefile. --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index f694c5a..83ae976 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ IFCHD_OBJS = $(IFCHD_SRCS:.c=.o) NDHC_OBJS = $(NDHC_SRCS:.c=.o) NCM_INC = -I./ncmlib BUILD_DIR = build -OBJ_DIR = objs +OBJ_DIR = $(BUILD_DIR)/objs CC = gcc AR = ar @@ -20,10 +20,10 @@ CFLAGS = -O2 -s -std=gnu99 -pedantic -Wall -D_GNU_SOURCE -DHAVE_CLEARENV -DLINUX all: makedir ncmlib.a ifchd ndhc clean: - rm -Rf $(OBJ_DIR) $(BUILD_DIR) + rm -Rf $(BUILD_DIR) makedir: - mkdir -p $(OBJ_DIR)/ndhc $(OBJ_DIR)/ifchd $(OBJ_DIR)/ncmlib $(BUILD_DIR) + mkdir -p $(BUILD_DIR) $(OBJ_DIR)/ndhc $(OBJ_DIR)/ifchd $(OBJ_DIR)/ncmlib %.o: %.c $(CC) $(CFLAGS) $(NCM_INC) -c -o $(OBJ_DIR)/$@ $<