CURDIR=main
all: main
OBJS =  linuxconf.o notice.o _dict.o
LDF = $(OPTDYNAMIC) -lm
LIBS_PROJECT = ../askrunlevel/askrunlevel.a ../netconf/netconf.a \
	../xconf/xconf.a ../translate/translate.a ../misc/misc.a \
	../dialog/dialog.a
LIBS =  $(LIBS_PROJECT) -lncurses $(CRYPTLIB)

LOCAL_INSTALLLADR=localinstall_ladr
LOCAL_INSTALL=localinstall
LOCAL_CLEAN=localclean
localclean:
	rm -f linuxconf

include ../rules.mak

proto:
	proto -Di386 -m0+ *.cc

# LNXMODULES allows one to link "statically" a module. This helps
# debugging. Nothing has to be changed in the module to link it
# this way. Statically linked module is against the licensing agreement
# of linuxconf but tolerate to supply solutions to a.out users.
main: main.obt $(OBJS) $(LIBS_PROJECT)
	$(GPPLINK) $(LNXMODULES) $(LDF) -o linuxconf $< $(OBJS) $(LIBS) $(DBGLIBS)

localinstall: msg.install install_bin

install_bin: html_version
	install -m 4755 -o root -g root linuxconf $(BIN)/linuxconf
	ln -sf /bin/linuxconf $(BIN)/netconf
	ln -sf /bin/linuxconf $(BIN)/fsconf
	ln -sf /bin/linuxconf $(SBIN)/askrunlevel
	ln -sf /bin/linuxconf $(SBIN)/fixperm
	ln -sf /bin/linuxconf $(SBIN)/mailconf
	ln -sf /bin/linuxconf $(SBIN)/uucpconf
	ln -sf /bin/linuxconf $(SBIN)/dnsconf
	ln -sf /bin/linuxconf $(BIN)/userconf

# Update the file introweb.html with the current release number
html_version:
	(cd ../help.files/sources/main && make HELPDIR=$(LIB_LINUXCONF)/help.eng/main)

install-module:
	(cd ../modules && make install)

# Test program



