Make manual-build-maker.lisp generate Makefile instead of shell script
This commit is contained in:
parent
4003931ed9
commit
d19f37cfed
1 changed files with 13 additions and 7 deletions
|
@ -75,21 +75,27 @@
|
|||
|
||||
(defun make-compile-command (file)
|
||||
(let ((str
|
||||
(format nil "g++ -O2 -c ~A -o ~A"
|
||||
(namestring (make-relative file))
|
||||
(get-build-path file))))
|
||||
(format nil "g++ -O2 -c $< -o $@"
|
||||
;(namestring (make-relative file))
|
||||
;(get-build-path file)
|
||||
)))
|
||||
(when (string-equal "Bitmap" (pathname-name file))
|
||||
(setf str (format nil "~A -I./fakes/" str)))
|
||||
(format nil "echo ~A~%~A~%" str str)))
|
||||
(format nil "~A: ~A~%~C~A~%~%"
|
||||
(get-build-path file)
|
||||
(namestring (make-relative file))
|
||||
#\Tab
|
||||
str)))
|
||||
|
||||
(defun make-link-command (sources)
|
||||
(format nil "echo Linking.~%g++ -O2 -o CSE2 ~{~A ~}-lX11 -lm~%"
|
||||
(mapcar 'get-build-path sources)))
|
||||
(format nil "CSE2: ~{~A ~}~%~Cg++ -O2 -o $@ $^ -lX11 -lXext -lm~%"
|
||||
(mapcar 'get-build-path sources)
|
||||
#\Tab))
|
||||
|
||||
(defun make-build-script (output-path)
|
||||
(with-open-file (stream output-path :direction :output :if-exists :supersede :if-does-not-exist :create)
|
||||
(setf *root-dir* (make-pathname :directory '(:relative)))
|
||||
(format stream "#!/bin/sh~%~%")
|
||||
;;(format stream "#!/bin/sh~%~%")
|
||||
(let ((sources (get-sources)))
|
||||
(loop :for file :in sources
|
||||
:for build-path := (get-build-path file)
|
||||
|
|
Loading…
Add table
Reference in a new issue