2 # Makefile for Regina REXX Interpreter
4 # Using Cygwin to build for SkyOS
7 SKYOS_INC = $(SKYOS_BASE)/include
8 SKYOS_LIB = $(SKYOS_BASE)/lib
9 #LIB_SKYGI = $(SKYOS_LIB)/libskygi.a $(SKYOS_LIB)/librsm.a
10 #LIB_LIBNEWC = $(SKYOS_LIB)/libnewc.a
11 LIB_LIBM = $(SKYOS_LIB)/libm.a
12 #LIB_NET = $(SKYOS_LIB)/libnet.a
18 SHARED_LIBSKY = $(SKYOS_BASE)/lib/libsky.lib
19 SHARED_LIBRSM = $(SKYOS_BASE)/lib/librsm.lib
20 SHARED_LIBSKYGI = $(SKYOS_BASE)/lib/libskygi.lib
21 SHARED_LIBLINUX = #$(SKYOS_BASE)/lib/liblinux.lib
22 SHARED_LIBNET = $(SKYOS_BASE)/lib/libnet.lib
23 STATIC_SKYLIBS = #$(SKYOS_BASE)/lib/libm.a
24 SHARED_GUILIBS = $(SHARED_LIBSKY) $(SHARED_LIBRSM) $(SHARED_LIBSKYGI) $(SHARED_LIBLINUX) $(SHARED_LIBNET) $(STATIC_SKYLIBS) #div.o
25 LIB_CRT0 = $(SKYOS_BASE)/lib/crt0_pe.o
26 LD_FLAGS = $(LD_DEBUG_FLAGS) -L $(SKYOS_BASE)/lib $(LIB_CRT0) --subsystem native -e start
32 SRCDIR=$(REGINA_SRCDIR)
35 include $(SRCDIR)\regina.ver
46 OPTIMIZE = -O2 -DNDEBUG -g
59 USEFLISTS = -DNOFLISTS
63 SKYOS_C_FLAGS = -nostdinc -nostdlib -fno-builtin -funsigned-char -Wall -I$(SKYOS_INC) -I$(SKYOS_INC)/sys -I$(SKYOS_INC)/skyos -DREGINA_SHARE_DIRECTORY=\"/boot/programs/rexx/share\"
64 SKYOS_LD_FLAGS = -nostdlib $(LD_FLAGS) -Map $@.map
66 CEXTRA = -DSKYOS -funsigned-char $(SKYOS_C_FLAGS) -DREGINA_VERSION_DATE=\"$(VER_DATE)\" -DREGINA_VERSION_MAJOR=\"$(VER_MAJOR)\" -DREGINA_VERSION_MINOR=\"$(VER_MINOR)\" -DREGINA_VERSION_SUPP=\"$(VER_SUPP)\" #-DPOSIX_SOURCE
67 EEXTRA = $(SKYOS_LD_FLAGS)
68 EXTQUEUE_OBJS = extstack.$(OBJ) rexxbif.$(OBJ)
69 EXTQUEUE_SHOBJS = extstack.sho rexxbif.sho
70 DYN_COMP = -DDYNAMIC #-D_REENTRANT -DPOSIX
71 LIBS = $(SHARED_GUILIBS) #$(LIB_SKYGI) $(LIB_CRT0) $(LIB_LIBNEWC) $(LIB_LIBM) $(LIB_NET)
73 SHLDEF = $(REGINA_SRCDIR)/regina_skyos_dll.def
74 TEST1DEF = $(REGINA_SRCDIR)/test1_skyos_dll.def
75 TEST2DEF = $(REGINA_SRCDIR)/test2_skyos_dll.def
80 SHL_TARGETS= rxstack.app rxqueue.app regina.app librxtest1.dll librxtest2.dll
82 SHL_LD = dlltool --machine i386 --output-exp libregina.exp --input-def $(SHLDEF) --dllname libregina.dll --output-lib libregina.lib
83 SHL1 = ld $(SHOFILES) -o libregina.dll libregina.exp $(LIBS) --image-base 0x69500000 --entry _DllMain -Map mapfile
85 TEST1_LD= dlltool --machine i386 --output-exp libtest1.exp --input-def $(TEST1DEF) --dllname librxtest1.dll
86 TEST1_SHL1= ld $(LDOPT) test1.sho -o librxtest1.dll libtest1.exp $(LIBS) libregina.lib --image-base 069600000 --entry _DllMain -Map mapfile
88 TEST2_LD= dlltool --machine i386 --output-exp libtest2.exp --input-def $(TEST2DEF) --dllname librxtest2.dll
89 TEST2_SHL1= ld $(LDOPT) test2.sho -o librxtest2.dll libtest2.exp $(LIBS) libregina.lib --image-base 069700000 --entry _DllMain -Map mapfile
94 OBJECTS = `cat $(SRCDIR)/go32.rsp`
104 LIBFLAGS = cr $(LIBPRE)$(LIBFILE).$(LIBPST)
105 LIBLINK = -L. -l$(LIBFILE) $(LIBS)
106 LINKSHL = $(LIBPRE)$(SHLFILE).$(SHL)
112 RANLIB_LIB=-ranlib $(LIBPRE)$(LIBFILE).a
116 # Include the common rules for the interpreter
118 include $(SRCDIR)/makefile.com
120 # Make temporary ISO image for testing SkyOS under VirtualPC
122 -mkdir -p ../iso/$(ISODIR)
123 -mkdir -p ../iso/rexx
124 cp *.pkg ../iso/$(ISODIR)
125 cp *.app ../iso/$(ISODIR)
126 cp *.dll ../iso/$(ISODIR)
128 cp $(SRCDIR)/rexxsaa.h ../iso
129 cp $(SRCDIR)/demo/*.rexx ../iso/rexx
130 cp $(SRCDIR)/*.mts ../iso/rexx
131 (cd ../iso;zip -r regina.zip *)
132 (cd ../iso;mkisofs -v -r -T -l -L -J -V "Regina for SkyOS" -A "Regina" -o ../regina.iso .)
133 isoinfo -l -i ../regina.iso
136 # -mkdir -p programs/rexx/extensions
137 -mkdir -p programs/rexx/demo
138 -mkdir -p programs/rexx/share
139 regina $(SRCDIR)/common/fixrc.rexx $(SRCDIR)/install.sif ./install.sif $(VERDOT) $(VERDATE)
140 strip rexx.app execiser.app rxstack.app rxqueue.app
141 cp rexx.app programs/rexx
142 cp execiser.app programs/rexx
143 cp rxstack.app programs/rexx
144 cp rxqueue.app programs/rexx
145 cp $(SRCDIR)/cyg-$(USER)/*.mtb programs/rexx/share
147 # strip regina.app libregina.dll librxtest1.dll librxtest2.dll
148 # cp regina.app programs/rexx
149 # cp libregina.dll programs/rexx
150 # cp librxtest1.dll programs/rexx/extensions
151 # cp librxtest2.dll programs/rexx/extensions
152 # cp $(SRCDIR)/demo/dynfunc.rexx programs/rexx/demo
153 cp $(SRCDIR)/demo/rexxcps.rexx programs/rexx/demo
154 cp $(SRCDIR)/demo/newstr.rexx programs/rexx/demo
155 cp $(SRCDIR)/demo/block.rexx programs/rexx/demo
156 cp $(SRCDIR)/README.SkyOS programs/rexx
157 cp $(SRCDIR)/COPYING-LIB programs/rexx
158 zip -r Regina-REXX-SkyOS-$(VERDOT).pkg install.sif programs