blob: 0771568d1b1a47d4fc38f8e908966eb2f5be8a48 [file] [log] [blame]
SRCROOT = ..
include $(SRCROOT)/MCONFIG
include $(SRCROOT)/MRULES
MAKEDEPS = -Wp,-MD,.$(subst /,-,$*).d
CFLAGS = $(MAKEDEPS) $(OPTFLAGS) $(REQFLAGS) -W -Wall \
-I$(SRCROOT)/ipconfig \
-I$(SRCROOT)/nfsmount \
# -DINI_DEBUG -g
LIBS = \
$(SRCROOT)/nfsmount/libnfsmount.a \
$(SRCROOT)/ipconfig/libipconfig.a \
$(KLIBC) $(LIBGCC)
PROGS = kinit
OBJS = kinit.o do_mounts.o nfsroot.o
all: $(PROGS)
kinit: $(OBJS) $(LIBS) $(CRT0)
$(LD) $(LDFLAGS) -o $@ $(CRT0) $(OBJS) $(LIBS)
cp -f $@ $@.g
$(STRIPCMD) $@
clean:
-rm -f *.o *.g kinit
spotless: clean
-rm -f .*.d *~
# This should perhaps be a shared binary?
install: all
$(INSTALL_EXEC) $(PROGS) $(INSTALLROOT)$(INSTALLDIR)/$(CROSS)bin
ifneq ($(wildcard .*.d),)
include $(wildcard .*.d)
endif