1#
2# This makefile builds the necessary files for a binary release
3#
4# The environment variable ARCH must be set to indicate the machine
5# architecture
6#
7
8CP = /bin/cp
9RM = /bin/rm -f
10CHMOD = /bin/chmod
11INCLUDE_DIR = $(ALOG_DIR)/include
12LIB_DIR = $(ALOG_DIR)/lib/$(ARCH)
13BIN_DIR = $(ALOG_DIR)/bin/$(ARCH)
14
15
16install: global_install
17
18local_install:
19	cd $(ARCH) && ./configure && $(MAKE) clean
20	cd $(ARCH) && $(MAKE) install
21
22global_install: global_install_lib global_install_include
23
24global_install_lib: local_install
25	-(cd ../sys_lib/$(ARCH) && $(RM) `/bin/ls $(LIB_DIR)`)
26	$(CP) lib/$(ARCH)/* ../sys_lib/$(ARCH)
27	cd ../sys_lib/$(ARCH) && $(CHMOD) 664 `/bin/ls $(LIB_DIR)`
28
29global_install_include: local_install
30	-(cd ../sys_include && $(RM) `/bin/ls $(INCLUDE_DIR)`)
31	$(CP) include/* ../sys_include
32	cd ../sys_include && $(CHMOD) 664 `/bin/ls $(INCLUDE_DIR)`
33
34global_install_bin: local_install
35	-(cd ../sys_bin/$(ARCH) && $(RM) `/bin/ls $(BIN_DIR)`)
36	$(CP) bin/$(ARCH)/* ../sys_bin/$(ARCH)
37	cd ../sys_bin/$(ARCH) && $(CHMOD) 664 `/bin/ls $(BIN_DIR)`
38
39