Commit 84ce62c8 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Set TOPDIR to pwd.

Added config subdir.
Remove INCLUDEDIR and LIBDIR on 'make clean'.
Check that Config has been run.
parent 5a7be8d0
TOPDIR = /usr/lyskom
TOPDIR := $(shell pwd)
SCRIPTDIR = $(TOPDIR)/scripts
include $(SCRIPTDIR)/import.make
SUBDIRS = doc junk scripts src
SUBDIRS = doc junk scripts src config
SERVER-VER = 1.0
all: includes libraries binaries
all: msg includes libraries binaries end-msg
includes:
includes: $(INCLUDEDIR)/m-config.h
-mkdir $(INCLUDEDIR)
for i in $(SUBDIRS) ; \
do \
......@@ -17,7 +17,7 @@ includes:
done
libraries:
libraries: $(INCLUDEDIR)/m-config.h
-mkdir $(LIBDIR)
for i in $(SUBDIRS) ; \
do \
......@@ -27,10 +27,20 @@ libraries:
include $(SCRIPTDIR)/sub-binaries.make
include $(SCRIPTDIR)/sub-install.make
include $(SCRIPTDIR)/sub-clean.make
include $(SCRIPTDIR)/sub-depend.make
depend: includes
.PHONY: clean
clean:
$(RM) $(GENERIC-CLEAN)
$(RM) -r $(INCLUDEDIR)
$(RM) -r $(LIBDIR)
-for i in $(SUBDIRS); \
do \
[ -d $$i ] && { echo making clean in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) clean) } \
done
depend: $(INCLUDEDIR)/m-config.h msg includes
distribution: clean
-$(RM) -r lyskom-$(SERVER-VER)
......@@ -53,3 +63,17 @@ distribution: clean
$(RM) lyskom-$(SERVER-VER).tar.Z
compress lyskom-$(SERVER-VER).tar
$(RM) -r lyskom-$(SERVER-VER)
msg:
@echo Top-level source directory is believed to be $(TOPDIR)
@date
@echo
end-msg:
@echo
@echo Finished at
@date
$(INCLUDEDIR)/m-config.h:
@echo You must run Config before Build or make.
@exit 1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment