Move source from ndhc/ to src/ since ifchd is no longer a separate program.

This commit is contained in:
Nicholas J. Kain 2014-04-06 16:57:06 -04:00
parent b511d45c2f
commit b761889025
37 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
project (ndhcp)
project (ndhc)
cmake_minimum_required (VERSION 2.6)
@ -44,4 +44,4 @@ endif()
include_directories("${PROJECT_SOURCE_DIR}/ncmlib")
add_subdirectory(ncmlib)
add_subdirectory(ndhc)
add_subdirectory(src)

View File

@ -3,11 +3,11 @@
# at './build/ndhc'.
NCM_SRCS = $(sort $(wildcard ncmlib/*.c))
NDHC_SRCS = $(sort $(wildcard ndhc/*.c))
NDHC_SRCS = $(sort $(wildcard src/*.c))
NCM_OBJS = $(NCM_SRCS:.c=.o)
NDHC_OBJS = $(NDHC_SRCS:.c=.o)
NCM_INC = -I./ncmlib
NDHC_INC = -I./ndhc
NDHC_INC = -I./src
BUILD_DIR = build
OBJ_DIR = $(BUILD_DIR)/objs
@ -22,11 +22,11 @@ clean:
rm -Rf $(BUILD_DIR)
makedir:
mkdir -p $(BUILD_DIR) $(OBJ_DIR)/ndhc $(OBJ_DIR)/ncmlib
mkdir -p $(BUILD_DIR) $(OBJ_DIR)/src $(OBJ_DIR)/ncmlib
ifchd-parse.o:
ragel -G2 -o $(BUILD_DIR)/ifchd-parse.c ndhc/ifchd-parse.rl
$(CC) $(CFLAGS) $(NCM_INC) $(NDHC_INC) -c -o $(OBJ_DIR)/ndhc/$@ $(BUILD_DIR)/ifchd-parse.c
ragel -G2 -o $(BUILD_DIR)/ifchd-parse.c src/ifchd-parse.rl
$(CC) $(CFLAGS) $(NCM_INC) $(NDHC_INC) -c -o $(OBJ_DIR)/src/$@ $(BUILD_DIR)/ifchd-parse.c
%.o: %.c
$(CC) $(CFLAGS) $(NCM_INC) -c -o $(OBJ_DIR)/$@ $<
@ -36,7 +36,7 @@ ncmlib.a: $(NCM_OBJS)
$(RANLIB) $(BUILD_DIR)/$@
ndhc: $(NDHC_OBJS) ifchd-parse.o
$(CC) $(CFLAGS) $(NCM_INC) -o $(BUILD_DIR)/$@ $(subst ndhc/,$(OBJ_DIR)/ndhc/,$(NDHC_OBJS)) $(BUILD_DIR)/ncmlib.a $(BUILD_DIR)/objs/ndhc/ifchd-parse.o -lcap -lrt
$(CC) $(CFLAGS) $(NCM_INC) -o $(BUILD_DIR)/$@ $(subst src/,$(OBJ_DIR)/src/,$(NDHC_OBJS)) $(BUILD_DIR)/ncmlib.a $(BUILD_DIR)/objs/src/ifchd-parse.o -lcap -lrt
.PHONY: all clean

View File

View File