Move ifchd files to a subdirectory.

This commit is contained in:
Nicholas J. Kain 2010-11-12 04:51:49 -05:00
parent c999fee9f5
commit b42eeb8847
27 changed files with 19 additions and 115 deletions

View File

@ -1,4 +1,4 @@
project (ifchd) project (ndhcp)
cmake_minimum_required (VERSION 2.6) cmake_minimum_required (VERSION 2.6)
@ -8,18 +8,5 @@ set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -s -std=gnu99 -pedantic -Wall -lcap -DHAVE
#include_directories("${PROJECT_SOURCE_DIR}/ncmlib") #include_directories("${PROJECT_SOURCE_DIR}/ncmlib")
#add_subdirectory(ncmlib) #add_subdirectory(ncmlib)
set(IFCHD_SRCS add_subdirectory(ifchd)
ifchd.c
linux.c
strlist.c
signals.c
pidfile.c
chroot.c
nstrl.c
log.c
)
add_executable(ifchd ${IFCHD_SRCS})
#target_link_libraries(ifchd ncmlib)
add_subdirectory(ndhc) add_subdirectory(ndhc)

View File

@ -1,28 +0,0 @@
CC = gcc -Wall -Wpointer-arith -Wstrict-prototypes
AR = ar
objects = log.o nstrl.o chroot.o pidfile.o signals.o strlist.o linux.o ifchd.o
ifchd : $(objects)
$(CC) -lcap -o ifchd $(objects)
ifchd.o : log.h nstrl.h chroot.h pidfile.h signals.h strlist.h linux.h
$(CC) $(CFLAGS) $(archflags) $(LDFLAGS) -c -o $@ ifchd.c
linux.o: log.h strlist.h
chroot.o: log.h
pidfile.o: log.h
signals.o: log.h
strlist.o:
nstrl.o:
log.o :
install: ifchd
-install -s -m 755 ifchd /usr/sbin/ifchd
tags:
-ctags -f tags *.[ch]
-cscope -b
clean:
-rm -f *.o ifchd
distclean:
-rm -f *.o ifchd tags cscope.out

17
ifchd/CMakeLists.txt Normal file
View File

@ -0,0 +1,17 @@
project (ifchd)
cmake_minimum_required (VERSION 2.6)
set(IFCHD_SRCS
ifchd.c
linux.c
strlist.c
signals.c
pidfile.c
chroot.c
nstrl.c
log.c
)
add_executable(ifchd ${IFCHD_SRCS})
#target_link_libraries(ifchd ncmlib)

View File

View File

View File

View File

@ -2,9 +2,6 @@ project (ndhc)
cmake_minimum_required (VERSION 2.6) cmake_minimum_required (VERSION 2.6)
#include_directories("${PROJECT_SOURCE_DIR}/ncmlib")
#add_subdirectory(ncmlib)
set(NDHC_SRCS set(NDHC_SRCS
nstrl.c nstrl.c
log.c log.c

View File

@ -1,69 +0,0 @@
# ndhc makefile
prefix=/usr
SBINDIR=/sbin
USRSBINDIR=${prefix}/sbin
USRBINDIR=${prefix}/bin
USRSHAREDIR=${prefix}/share
# Uncomment this for extra output and to compile with debugging symbols
#DEBUG=1
#CROSS_COMPILE=arm-uclibc-
CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)gcc
INSTALL = install
VER := 0.9.8
OBJS_SHARED = nstrl.o log.o options.o socket.o packet.o rootcap.o
DHCPC_OBJS = dhcpc.o clientpacket.o script.o
EXEC2 = ndhc
OBJS2 = -lcap $(DHCPC_OBJS) $(OBJS_SHARED)
BOOT_PROGRAMS = ndhc
ifdef SYSLOG
CFLAGS += -DSYSLOG
endif
CFLAGS += -W -Wall -Wstrict-prototypes -DVERSION='"$(VER)"'
ifdef DEBUG
CFLAGS += -g -DDEBUG
STRIP=true
else
CFLAGS += -Os -fomit-frame-pointer
STRIP=$(CROSS_COMPILE)strip
endif
all: $(EXEC2)
$(STRIP) --remove-section=.note --remove-section=.comment $(EXEC2)
$(OBJS2) $(OBJS3): *.h Makefile
$(EXEC2): Makefile
.c.o:
$(CC) -c $(CFLAGS) $<
$(EXEC2): $(OBJS2)
$(LD) $(LDFLAGS) $(OBJS2) -o $(EXEC2)
tags:
-ctags -f tags *.[ch]
-cscope -b
install: all
$(INSTALL) $(BOOT_PROGRAMS) $(USRSBINDIR)
mkdir -p $(USRSHAREDIR)/man/man8
$(INSTALL) ndhc.8 ndhc.8 $(USRSHAREDIR)/man/man8
clean:
-rm -f ndhc *.o core
distclean:
-rm -f ndhc *.o tags cscope.out