|
| 1 | +# rebuild symb_reg.txt, needed by sys_dylib.c |
| 2 | +# to build the export table for DOS dylib support |
| 3 | +# |
| 4 | +# expects standalone version |
| 5 | +# |
| 6 | +# running this makefile will touch sys_dylib.c |
| 7 | +# which will cause libfb to be made next time |
| 8 | +# fbc's top-level makefile is run. Of course, |
| 9 | +# that will cause libfb to be newer, again; |
| 10 | +# which would trigger the build in this makefile |
| 11 | +# if this makefile were to be run again. |
| 12 | +# |
| 13 | +# Currently, there is a cyclic dependency, between |
| 14 | +# fbc's top-level makefile and this makefile that |
| 15 | +# has not been solved out. But that's OK. Intent |
| 16 | +# is that it would simply be used from a higher |
| 17 | +# level script once during build. |
| 18 | +# |
| 19 | +# From top-level fbc directory: |
| 20 | +# make TARGET_OS=dos |
| 21 | +# make -f src/rtlib/dos/libexp.mk |
| 22 | +# make TARGET_OS=dos |
| 23 | +# |
| 24 | +# Also, check for changes in 'symb_reg.txt' and commit |
| 25 | +# changes to repository. |
| 26 | + |
| 27 | +FBC := fbc-dos.exe |
| 28 | +DXE3GEN := dxe3gen |
| 29 | +CP := cp |
| 30 | +RM := rm -f |
| 31 | +TOUCH := touch |
| 32 | + |
| 33 | +SRCDIR := ./src/rtlib/dos/ |
| 34 | +LIBDIR := ./lib/dos/ |
| 35 | +BINDIR := ./bin/dos/ |
| 36 | + |
| 37 | +.phony: all |
| 38 | +all: $(SRCDIR)symb_reg.txt |
| 39 | + |
| 40 | +$(SRCDIR)symb_reg.txt: $(LIBDIR)libfblst.txt $(BINDIR)maksymbr.exe |
| 41 | + $(BINDIR)maksymbr.exe -o $@ $< |
| 42 | + $(TOUCH) $(SRCDIR)sys_dylib.c |
| 43 | + |
| 44 | +$(BINDIR)maksymbr.exe: $(SRCDIR)maksymbr.bas |
| 45 | + $(FBC) $< -exx -x $@ |
| 46 | + |
| 47 | +$(LIBDIR)libfblst.txt: $(LIBDIR)libfb.dxe |
| 48 | + $(DXE3GEN) --show-exp $< > $@ |
| 49 | + |
| 50 | +$(LIBDIR)libfb.dxe: $(LIBDIR)libfb.a |
| 51 | + $(DXE3GEN) -o $@ --whole-archive -U $< |
| 52 | + |
| 53 | +.phony: clean |
| 54 | +clean: |
| 55 | + $(RM) $(LIBDIR)libfb.dxe |
| 56 | + $(RM) $(LIBDIR)libfblst.txt |
| 57 | + $(RM) $(BINDIR)maksymbr.exe |
0 commit comments