# Change CONFIG to be the .mk file that matches your system in config

CONFIG = ../system.mk

# Do not change anything below this line. They should be setup in config.

include $(CONFIG)

N_SRC = newstartd.c newaccess.c subnet.c
N_OBJS = newstartd.o newaccess.o subnet.o

# for people with braindead 'cc's that don't like -c foo.c -o foo.o
# and a hosed make
.c.o: ; $(CC) $(CFLAGS) -c $*.c

LIBS = $(EXTRALIBS)

GETPATH_SRC = getpath.c data.c
GETPATH = getpath.o data.o

CFLAGS = $(OPT) $(FLAGS) $(EXTRAFLAGS) $(FILES) $(DIRS) $(PORT)

all: newstartd

newstartd: $(N_OBJS) $(GETPATH)
	$(CC) $(CFLAGS) -o $@ $(N_OBJS) $(GETPATH) $(LIBS)

clean: rmdependencies
	/bin/rm -f *.o make.out core

reallyclean:  clean 
	rm -f newstartd *~ #*#

uninstall:
	-cd $(LIBDIR); rm -f newstartd

install: newstartd
	-@if [ ! -d $(LIBDIR) ]; then \
          /bin/mkdir $(LIBDIR); \
        fi
	$(INSTALL) $(INSTALLOPTS) newstartd $(LIBDIR)/newstartd

depend: 
	makedepend $(CFLAGS) -f Makefile $(N_SRC) $(GETPATH_SRC)

rmdependencies:
	makedepend

#####
# DO NOT DELETE THIS LINE -- make depend depends on it.
