1
0
mirror of https://github.com/fachat/xa65.git synced 2024-11-15 23:05:30 +00:00
xa65/xa/Makefile

80 lines
1.7 KiB
Makefile
Raw Normal View History

2011-12-16 22:04:51 +00:00
# Unix gcc or DOS go32 cross-compiling gcc
#
2024-03-12 08:25:18 +00:00
VERS = 2.4.1
2024-06-11 21:39:41 +00:00
CC = gcc -Wall
2011-12-16 22:04:51 +00:00
LD = gcc
# for testing. not to be used; build failures in misc/.
2024-03-12 08:25:18 +00:00
#CFLAGS = -O2 -W -Wall -pedantic -ansi -g
CFLAGS = -O2 -g
2011-12-16 22:04:51 +00:00
LDFLAGS = -lc
# for DOS?
# CC = gcc-go32
# LD = gcc-go32
# CFLAGS = -W -Wall -pedantic
# Other cc
#CC = cc
#CFLAGS =
#LD = ld
DESTDIR = /usr/local
BINDIR = $(DESTDIR)/bin
MANDIR = $(DESTDIR)/share/man/man1
DOCDIR = $(DESTDIR)/share/doc
MKDIR = mkdir -p
INSTALL = install
2023-02-11 13:09:07 +00:00
TESTS=ALL
2017-10-14 22:47:56 +00:00
all: killxa xa uncpk
killxa:
rm -f xa
2011-12-16 22:04:51 +00:00
xa:
(cd src && LD=${LD} CC="${CC} ${CFLAGS}" ${MAKE})
2023-11-19 20:24:38 +00:00
#load:
# (cd loader && CC="${CC} ${CFLAGS}" ${MAKE})
2011-12-16 22:04:51 +00:00
uncpk:
(cd misc && CC="${CC} ${CFLAGS}" ${MAKE})
dos: clean
(cd src && LD=gcc-go32 CC=gcc-go32 CFLAGS="-W -Wall -pedantic" ${MAKE})
(cd misc && CC=gcc-go32 CFLAGS="-W -Wall -pedantic" ${MAKE})
rm -f xa file65 ldo65 uncpk printcbm reloc65 mkrom.sh src/*.o
mingw: clean
(cd src && LD=${LD} CC=${CC} CFLAGS="${CFLAGS}" LDFLAGS="" ${MAKE})
(cd misc && LD=${LD} CC=${CC} CFLAGS="${CFLAGS}" LDFLAGS="" ${MAKE})
clean:
(cd src && ${MAKE} clean)
2023-11-19 20:24:38 +00:00
#(cd loader && ${MAKE} clean)
2011-12-16 22:04:51 +00:00
(cd misc && ${MAKE} mrproper)
2023-02-11 13:09:07 +00:00
rm -f xa *.exe *.o65 *.s core
2011-12-16 22:04:51 +00:00
2023-11-19 20:24:38 +00:00
install: all
2011-12-16 22:04:51 +00:00
$(MKDIR) $(BINDIR)
$(MKDIR) $(MANDIR)
$(INSTALL) xa reloc65 ldo65 file65 printcbm uncpk $(BINDIR)
$(INSTALL) man/file65.1 man/ldo65.1 man/printcbm.1 man/reloc65.1 man/uncpk.1 man/xa.1 $(MANDIR)
#$(MKDIR) $(DOCDIR)/xa65
dist: clean
2023-11-19 20:24:38 +00:00
cd .. ; tar cvf xa-$(VERS).tar xa-$(VERS) ; gzip xa-$(VERS).tar
2023-11-19 20:24:38 +00:00
# no prereqs to force parallel make to play nice
test:
rm -rf xa
$(MAKE) xa
$(MAKE) uncpk
2023-02-11 13:09:07 +00:00
cd tests && ./harness \
-tests="$(TESTS)" \
2023-11-19 20:24:38 +00:00
-cc="$(CC)" -cflags="$(CFLAGS)" \
-make="$(MAKE)" -makeflags="$(MAKEFLAGS)"