Finish the build infrastructure for separate linking.
This commit is contained in:
parent
a700e483db
commit
3697f5169d
12 changed files with 77 additions and 22 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@
|
|||
*.o
|
||||
*.so
|
||||
*.import.scm
|
||||
brmsaptool
|
||||
|
|
49
Makefile
49
Makefile
|
@ -23,43 +23,48 @@
|
|||
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
brmsaptool: brmsaptool.o testing.o listing.o month.o period.o ansi.o \
|
||||
member-file.o dictionary.o command-line.o
|
||||
csc -o brmsaptool $^
|
||||
|
||||
.PHONY: all
|
||||
all: testing.so testing.import.scm listing.so listing.import.scm \
|
||||
month.so month.import.scm period.so period.import.scm \
|
||||
ansi.so ansi.import.scm member-file.so \
|
||||
member-file.import.scm dictionary.so \
|
||||
dictionary.import.scm
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f *.o *.import.scm brmsaptool
|
||||
|
||||
################################################################
|
||||
# Module shared object and import source compilation
|
||||
|
||||
%.so: %.scm
|
||||
csc -s $<
|
||||
%.o: %.scm
|
||||
csc -c $<
|
||||
|
||||
%.import.scm: %.scm
|
||||
csc -J $<
|
||||
csc -c -J $<
|
||||
|
||||
################################################################
|
||||
# Modules
|
||||
|
||||
testing.so: testing.scm
|
||||
testing.o: testing.scm
|
||||
testing.import.scm: testing.scm
|
||||
|
||||
listing.so: listing.scm
|
||||
listing.import.scm: listing.scm
|
||||
listing.o: listing.scm testing.import.scm
|
||||
listing.import.scm: listing.scm testing.import.scm
|
||||
|
||||
dictionary.so: dictionary.scm
|
||||
dictionary.import.scm: dictionary.scm
|
||||
dictionary.o: dictionary.scm testing.import.scm
|
||||
dictionary.import.scm: dictionary.scm testing.import.scm
|
||||
|
||||
month.so: month.scm
|
||||
month.import.scm: month.scm
|
||||
month.o: month.scm testing.import.scm
|
||||
month.import.scm: month.scm testing.import.scm
|
||||
|
||||
period.so: period.scm
|
||||
period.import.scm: period.scm
|
||||
period.o: period.scm testing.import.scm month.import.scm
|
||||
period.import.scm: period.scm testing.import.scm month.import.scm
|
||||
|
||||
ansi.so: ansi.scm
|
||||
ansi.import.scm: ansi.scm
|
||||
ansi.o: ansi.scm testing.import.scm
|
||||
ansi.import.scm: ansi.scm testing.import.scm
|
||||
|
||||
member-file.so: member-file.scm dictionary.import.scm ansi.import.scm
|
||||
member-file.import.scm: member-file.scm dictionary.import.scm ansi.import.scm
|
||||
member-file.o: member-file.scm dictionary.import.scm ansi.import.scm month.import.scm period.import.scm listing.import.scm testing.import.scm
|
||||
member-file.import.scm: member-file.scm dictionary.import.scm ansi.import.scm month.import.scm period.import.scm listing.import.scm testing.import.scm
|
||||
|
||||
command-line.o: command-line.scm testing.import.scm
|
||||
command-line.import.scm: command-line.scm testing.import.scm
|
||||
|
||||
brmsaptool.o: brmsaptool.scm testing.import.scm listing.import.scm dictionary.import.scm month.import.scm period.import.scm ansi.import.scm member-file.import.scm command-line.import.scm
|
||||
|
|
2
ansi.scm
2
ansi.scm
|
@ -23,6 +23,8 @@
|
|||
;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
;;
|
||||
|
||||
(declare (unit ansi))
|
||||
|
||||
(module
|
||||
ansi
|
||||
(
|
||||
|
|
|
@ -23,6 +23,15 @@
|
|||
;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
;;
|
||||
|
||||
;(declare (uses testing
|
||||
; listing
|
||||
; dictionary
|
||||
; month
|
||||
; period
|
||||
; member-file
|
||||
; command-line
|
||||
; ansi))
|
||||
|
||||
(import testing
|
||||
listing
|
||||
dictionary
|
||||
|
|
|
@ -1,4 +1,28 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# brmsaptool.sh
|
||||
#
|
||||
# Runs the tool as Scheme script using csi.
|
||||
#
|
||||
# ISC License
|
||||
#
|
||||
# Copyright 2023 Brmlab, z.s.
|
||||
# Dominik Pantůček <dominik.pantucek@trustica.cz>
|
||||
#
|
||||
# Permission to use, copy, modify, and/or distribute this software
|
||||
# for any purpose with or without fee is hereby granted, provided
|
||||
# that the above copyright notice and this permission notice appear
|
||||
# in all copies.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
||||
# WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
||||
# AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
|
||||
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
# OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
|
||||
# NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
|
||||
csi -q -b \
|
||||
testing.scm \
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
;;
|
||||
|
||||
(declare (unit command-line))
|
||||
|
||||
(module
|
||||
command-line
|
||||
(command-line
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
;;
|
||||
|
||||
(declare (unit dictionary))
|
||||
|
||||
(module
|
||||
dictionary
|
||||
(
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
;;
|
||||
|
||||
(declare (unit listing))
|
||||
|
||||
(module
|
||||
listing (print-source-listing listing-tests!)
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
;;
|
||||
|
||||
(declare (unit member-file))
|
||||
|
||||
(module
|
||||
member-file
|
||||
(
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
;;
|
||||
|
||||
(declare (unit month))
|
||||
|
||||
(module
|
||||
month
|
||||
(
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
;;
|
||||
|
||||
(declare (unit period))
|
||||
|
||||
(module
|
||||
period
|
||||
(
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
;; CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
;;
|
||||
|
||||
(declare (unit testing))
|
||||
|
||||
(module
|
||||
testing
|
||||
(test-eq? test-equal? test-exn test-true test-false run-tests)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue