1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-02 15:29:33 +00:00

New install script from Stefan Haubenthal that (among other things) sets

CC65_HOME.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4681 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2010-06-03 12:02:26 +00:00
parent 710f59b654
commit bfbe531f33

View File

@ -1,42 +1,54 @@
; $VER: Install_cc65 0.9 (Jul 9 2007) © Stefan Haubenthal ; $VER: Install_cc65 1.0 (2.6.2010) © Stefan Haubenthal
(set #help-bin "Choose location of archiver, assembler, compiler, compiler driver, disassembler, resource compiler, linker and object dumper.") (set #help-bin "Choose location of archiver, assembler, compiler, compiler driver, disassembler, resource compiler, linker, object dumper and character converter.")
(set #help-inc "Choose location of ANSI and target platform headers. The new directory is called 'include'.") (set #help-inc "Choose location of ANSI and target platform headers. The new directory is called 'include' resp. 'asminc'.")
(set #help-lib "Choose location of runtime objects and target platform libraries. The new directory is called 'lib'.") (set #help-lib "Choose location of runtime objects and target platform libraries. The new directory is called 'lib'. If necessary CC65_LIB will be set.")
(if (run "which sh")
(message "The compiler driver (cl65) is missing a Unix shell (sh)."))
(copyfiles (copyfiles
(source "//src/") (source "//src/")
(dest (dest
(set #dir-bin (askdir (prompt "Copy binaries (should be part of execution path)") (help #help-bin) (default @default-dest))) (set #dir-bin (askdir (prompt "Copy binaries (should be part of execution path)") (help #help-bin) (default @default-dest)))
(choices "ar65/ar65" "ca65/ca65" "cc65/cc65" "cl65/cl65" "da65/da65" "grc/grc" "ld65/ld65" "od65/od65")
) )
(choices "ar65/ar65" "ca65/ca65" "cc65/cc65" "cl65/cl65" "da65/da65" "grc/grc" "ld65/ld65" "od65/od65" "co65/co65" "chrcvt/chrcvt")
) )
(complete 25) (complete 25)
(copyfiles (copyfiles
(source "//include/") (source "//include/")
(dest (dest
(set #dir-inc (tackon (set #dir-inc0 (askdir (prompt "Copy headers (directory will be created)") (help #help-inc) (default @default-dest))) "include")) (set #dir-inc (tackon (set #dir-home (askdir (prompt "Copy C headers (directory will be created)") (help #help-inc) (default @default-dest))) "include"))
(all)
) )
(all)
) )
(complete 50) (complete 50)
(copyfiles (copyfiles
(source "//libsrc/") (source "//asminc/")
(dest (dest
(set #dir-lib (tackon (askdir (prompt "Copy libraries (directory will be created)") (help #help-lib) (default #dir-inc0)) "lib")) (set #dir-inc (tackon (askdir (prompt "Copy assembler headers (directory will be created)") (help #help-inc) (default #dir-home)) "asminc"))
(pattern "#?.(lib|o)")
) )
(all)
) )
(complete 75) (complete 75)
(run "setenv CC65_INC SAVE" #dir-inc (confirm) (prompt "Set environment variable for headers?") (help "CC65_INC will be saved in 'ENVARC:'.")) (copyfiles
(source "//libsrc/")
(dest
(set #dir-lib (tackon (askdir (prompt "Copy libraries (directory will be created)") (help #help-lib) (default #dir-home)) "lib"))
)
(pattern "#?.(lib|o)")
)
(complete 90) (complete 90)
(run "setenv CC65_LIB SAVE" #dir-lib (confirm) (prompt "Set environment variable for libraries?") (help "CC65_LIB will be saved in 'ENVARC:'".)) (run "setenv CC65_HOME SAVE" #dir-home (confirm) (prompt "Set environment variable for compiler home?") (help "CC65_HOME will be saved in 'ENVARC:'."))
(run "setenv CC65_INC" #dir-inc) ;(if (not (= (tackon #dir-home "include") #dir-inc))
(run "setenv CC65_LIB" #dir-lib) ; (run "setenv CC65_INC SAVE" #dir-inc)
(run "resident cc" (tackon #dir-bin "cl65")) (if (not (= (tackon #dir-home "lib") #dir-lib))
(run "setenv CC65_LIB SAVE" #dir-lib))
;(run "resident cc" (tackon #dir-bin "cl65"))
(complete 100) (complete 100)
(message "The cross-compiler is now ready, just type 'cc -h' in a shell.") (message "The cross-compiler is now ready, just type 'cl65 --help' in a shell.")