114 lines
3.1 KiB
Makefile
114 lines
3.1 KiB
Makefile
#
|
|
# Makefile
|
|
#
|
|
# Building the binary from sources.
|
|
#
|
|
# 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.
|
|
#
|
|
|
|
.PHONY: all
|
|
all: brmsaptool brmsaptool-static
|
|
|
|
CSC=csc
|
|
|
|
BRMSAPTOOL-SOURCES=brmsaptool.o testing.o listing.o month.o period.o \
|
|
ansi.o member-file.o dictionary.o command-line.o \
|
|
members-base.o utils.o
|
|
|
|
brmsaptool: $(BRMSAPTOOL-SOURCES)
|
|
$(CSC) -o $@ $^
|
|
|
|
brmsaptool-static: brmsaptool.scm $(BRMSAPTOOL-SOURCES)
|
|
$(CSC) -static -o $@ $<
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -f *.o *.import.scm brmsaptool
|
|
|
|
################################################################
|
|
# Module shared object and import source compilation
|
|
|
|
%.o: %.scm
|
|
$(CSC) -c $<
|
|
|
|
%.import.scm: %.scm
|
|
$(CSC) -c -J $<
|
|
|
|
################################################################
|
|
# Modules
|
|
|
|
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 members-base.import.scm \
|
|
utils.import.scm
|
|
|
|
TESTING-SOURCES=testing.scm
|
|
|
|
testing.o: $(TESTING-SOURCES)
|
|
testing.import.scm: $(TESTING-SOURCES)
|
|
|
|
LISTING-SOURCES=listing.scm testing.import.scm
|
|
|
|
listing.o: $(LISTING-SOURCES)
|
|
listing.import.scm: $(LISTING-SOURCES)
|
|
|
|
DICTIONARY-SOURCES=dictionary.scm testing.import.scm
|
|
|
|
dictionary.o: $(DICTIONARY-SOURCES)
|
|
dictionary.import.scm: $(DICTIONARY-SOURCES)
|
|
|
|
MONTH-SOURCES=month.scm testing.import.scm
|
|
|
|
month.o: $(MONTH-SOURCES)
|
|
month.import.scm: $(MONTH-SOURCES)
|
|
|
|
PERIOD-SOURCES=period.scm testing.import.scm month.import.scm
|
|
|
|
period.o: $(PERIOD-SOURCES)
|
|
period.import.scm: $(PERIOD-SOURCES)
|
|
|
|
ANSI-SOURCES=ansi.scm testing.import.scm utils.import.scm
|
|
|
|
ansi.o: $(ANSI-SOURCES)
|
|
ansi.import.scm: $(ANSI-SOURCES)
|
|
|
|
MEMBER-FILE-SOURCES=member-file.scm dictionary.import.scm \
|
|
ansi.import.scm month.import.scm period.import.scm \
|
|
listing.import.scm testing.import.scm
|
|
|
|
member-file.o: $(MEMBER-FILE-SOURCES)
|
|
member-file.import.scm: $(MEMBER-FILE-SOURCES)
|
|
|
|
COMMAND-LINE-SOURCES=command-line.scm testing.import.scm
|
|
|
|
command-line.o: $(COMMAND-LINE-SOURCES)
|
|
command-line.import.scm: $(COMMAND-LINE-SOURCES)
|
|
|
|
MEMBERS-BASE-SOURCES=members-base.scm testing.import.scm \
|
|
utils.import.scm dictionary.import.scm member-file.import.scm
|
|
|
|
members-base.o: $(MEMBERS-BASE-SOURCES)
|
|
members-base.import.scm: $(MEMBERS-BASE-SOURCES)
|
|
|
|
UTILS-SOURCES=utils.scm testing.import.scm
|
|
|
|
utils.o: $(UTILS-SOURCES)
|
|
utils.import.scm: $(UTILS-SOURCES)
|