Commit 32a5098d authored by John van Groningen's avatar John van Groningen
Browse files

add makefile and shell script to make a 64 bit windows backend.dll on 64 bit linux using ming

parent 516dfb8e
CC = x86_64-w64-mingw32-gcc
CFLAGS = -D_WINDOWS_ -DG_A64 -O -fomit-frame-pointer
OBJECTS = \
backend_dllexport.o backendsupport.o buildtree.o cocl.o \
codegen1.o codegen2.o codegen3.o codegen.o \
comsupport.o dbprint.o instructions.o optimisations.o \
pattern_match_2.o sa.o set_scope_numbers.o settings.o statesgen.o windows_io.o
../backend.dll: $(OBJECTS)
$(CC) -shared -s $(OBJECTS) -o $@
backend_dllexport.c: backend.o
./add_dllexports.sh
# winedump -j export backend.dll
#!/bin/bash
cat ../backend.link64 | tr -d '\r' | sed -e "s/\/EXPORT://" > backend.dllexport_symbols
ctags -x --c-kinds=f backend.c > backend.c_tags
cp backend.c backend_dllexport.c
cat backend.dllexport_symbols | while read in
do
line_n=`grep "$in " backend.c_tags | sed -e "s/ [ ]*/ /g" | cut -d ' ' -f 3`
sed -e "$line_n""s/$in/__declspec(dllexport)$in/" backend_dllexport.c > backend_dllexport_.c
mv backend_dllexport_.c backend_dllexport.c
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment