Previous attempt to remove some compiler warnings was
[AROS-Contrib.git] / regina / makefile.skyos
blob251e25339adb8cb36a06606f78ee2fc42848efe8
2 # Makefile for Regina REXX Interpreter
4 # Using Cygwin to build for SkyOS
6 SKYOS_BASE = c:/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
13 LIB_SKYGI = -lskygi
14 LIB_LIBNEWC  = -lnewc
15 #LIB_LIBM     = -lm
16 LIB_NET = -lnet -lrsm
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
28 CYGWIN = c:/cygwin
31 SHELL =        sh
32 SRCDIR=$(REGINA_SRCDIR)
33 CC = gcc
34 LD = ld
35 include $(SRCDIR)\regina.ver
36 VERDOT = $(VER_DOT)
37 VERDATE = $(VER_DATE)
40 ifeq ($(DEBUG),Y)
41 OPTIMIZE = -g -DDEBUG
42 LDOPT = -g
43 LDEXTRA=
44 ISODIR = debug
45 else
46 OPTIMIZE = -O2 -DNDEBUG -g
47 LDOPT = -O2 -g
48 LDEXTRA=#-strip $@
49 ISODIR = opt
50 endif
52 ifeq ($(TRACEMEM),Y)
53 MEMTRACE = -DTRACEMEM
54 else
55 MEMTRACE =
56 endif
58 ifeq ($(FLISTS),N)
59 USEFLISTS = -DNOFLISTS
60 else
61 USEFLISTS =
62 endif
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)
72 TCPLIBS        =
73 SHLDEF = $(REGINA_SRCDIR)/regina_skyos_dll.def
74 TEST1DEF = $(REGINA_SRCDIR)/test1_skyos_dll.def
75 TEST2DEF = $(REGINA_SRCDIR)/test2_skyos_dll.def
76 SHLIBS =
77 SHL = dll
78 LD_RXLIB1=
79 LD_RXLIB2=
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
91 LDEXTRA1=
92 LIBPRE = lib
93 LIBFILE        = regina
94 OBJECTS        = `cat $(SRCDIR)/go32.rsp`
95 OSAVE =        .sav
96 MV= +ren
98 SHLFILE        = regina
99 OBJ = o
100 EXE = .app
101 LIBPRE = lib
102 LIBPST = a
103 LIBEXE = ar
104 LIBFLAGS = cr $(LIBPRE)$(LIBFILE).$(LIBPST)
105 LIBLINK        = -L. -l$(LIBFILE) $(LIBS)
106 LINKSHL        = $(LIBPRE)$(SHLFILE).$(SHL)
107 RXLIB =        rxlib
108 RM = -del
109 THREADING =
110 MT_FILE        = mt_notmt
112 RANLIB_LIB=-ranlib $(LIBPRE)$(LIBFILE).a
114 CC2O=-o        $@
116 # Include the common rules for the interpreter
118 include        $(SRCDIR)/makefile.com
120 # Make temporary ISO image for testing SkyOS under VirtualPC
121 iso: all pkg
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)
127         cp *.lib iso
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
135 pkg: all
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
160 # End of makefile