1#*****************************************************************************
2# FILE           : $Source: /projects/higgs1/SNNS/CVS/SNNS/Makefile,v $
3# SHORTNAME      : Makefile
4# SNNS VERSION   : 4.2
5#
6# PURPOSE        : Basic Makefile for simplyfied SNNS installation
7# NOTES          : Do not change Makefiles
8#
9# AUTHOR         : Michael Vogt
10# DATE           : 27.02.98
11#
12# CHANGED BY     :
13# RCS VERSION    : $Revision: 1.6 $
14# LAST CHANGE    : $Date: 1998/03/18 15:24:09 $
15#
16#   Copyright (c) 1990-1995  SNNS Group, IPVR, Univ. Stuttgart, FRG
17#   Copyright (c) 1996-1998  SNNS Group, WSI, Univ. Tuebingen, FRG
18#
19#*****************************************************************************
20
21KERNELSRCDIR       = kernel/sources
22TOOLSSRCDIR        = tools/sources
23XGUISRCDIR         = xgui/sources
24MANSRCDIR          = man
25
26# Default target for the very impatient user
27
28all: makefiles compile
29
30
31# Be sure that configuration is up to date
32
33makefiles: Makefile.def config.h
34
35Makefile.def config.h: configuration/Makefile.din configuration/config.hin configure
36	@echo "Ensuring that SNNS is completely configured..."
37	./configure --quiet
38	@# touch config.h even if it's unchanged, so this target is done
39	@touch config.h
40	@echo ""
41
42configure: configuration/configure.in
43	@echo "configure script should be remade..."
44	cd configuration && autoconf && mv configure ..
45	@echo ""
46
47configuration/config.hin: configuration/configure.in configuration/config.h.bot \
48             configuration/acconfig.h
49	@echo "config.hin should be remade..."
50	cd configuration \
51	&& autoheader configure.in > config.hin
52	@echo ""
53
54# Targets for compilation and installation
55# Note that any install target ensures the kernel compilation through
56# the subordinated Makefile
57
58compile: compile-kernel compile-tools compile-xgui
59
60compile-kernel:
61	cd $(KERNELSRCDIR) && $(MAKE)
62
63compile-tools:
64	cd $(TOOLSSRCDIR) && $(MAKE)
65
66compile-xgui:
67	cd $(XGUISRCDIR) && $(MAKE)
68
69
70install: install-tools install-xgui
71
72install-tools:
73	cd $(TOOLSSRCDIR) && $(MAKE) install-strip
74
75install-xgui:
76	cd $(XGUISRCDIR) && $(MAKE) install-strip
77
78install-man:
79	cd $(MANSRCDIR) && $(MAKE) install
80
81# Targets for cleaning up after installation
82
83clean: clean-kernel clean-tools clean-xgui
84	rm -f config.status config.cache config.log
85
86clean-kernel:
87	cd $(KERNELSRCDIR) && $(MAKE) clean
88
89clean-tools:
90	cd $(TOOLSSRCDIR) && $(MAKE) clean
91
92clean-xgui:
93	cd $(XGUISRCDIR) && $(MAKE) clean
94
95
96# Targets to remove the SNNS installation
97
98uninstall: uninstall-kernel uninstall-tools uninstall-xgui
99
100uninstall-kernel:
101	cd $(KERNELSRCDIR) && $(MAKE) uninstall
102
103uninstall-tools:
104	cd $(TOOLSSRCDIR) && $(MAKE) uninstall
105
106uninstall-xgui:
107	cd $(XGUISRCDIR) && $(MAKE) uninstall
108
109uninstall-man:
110	cd $(MANSRCDIR) && $(MAKE) uninstall
111
112# Target to give information for bug reports
113
114bugreport: makefiles
115	@echo "Definitions in Makefile.def:"
116	@echo ""
117	@grep REPORT_IF_BUG Makefile.def | sed -e 's/# REPORT_IF_BUG//g'
118	@echo ""
119	@echo "Definitions in config.h:"
120	@echo ""
121	@grep '#define' config.h
122
123#*****************************************************************************
124# End of Makefile
125#*****************************************************************************
126