]>
git.zerfleddert.de Git - linexec-j720/blob - Makefile
1 # Makefile for building PocketPC ARM binary from Linux using wine and EVC
3 # Inspired by HRET written by anpaza
4 # Requires GNU Make, wine, and stuff from EVC, read ReadMe.wine
6 #============================================== User-defined variables ======#
7 # The directory where your MSVC for StrongARM and the SDK is installed.
8 # You should set up WINE (see /etc/wine.reg) so that it "sees" this drive
12 #=========================================================== Compilers ======#
13 # Set some env vars for msvc to use
15 WINE
=wine
--debugmsg fixme-console
21 # Makefile.project contains sources, target name, and libs
22 include Makefile.project
24 SUB1
= $(SRCS
:.
cpp=.obj
)
25 SUB2
= $(SUB1
:.asm
=.obj
)
26 SUB3
= $(SUB2
:.rc
=.res
)
27 SUB4
= $(SUB3
:%.obj
=$(OUT
)%.obj
)
28 OBJS
= $(SUB4
:%.res
=$(OUT
)%-res.obj
)
32 .SUFFIXES
: .exe .obj .res .asm
-res.obj
35 # You shouldn't need to change anything below.
37 CXX
=$(WINE
) -- $(BASE
)\\clarm.exe
-c
39 CXXFLAGS.DEF
=-DARM
-D_ARM_
-DUNICODE
-D_UNICODE
-DUNDER_CE
=300 -D_WIN32_WCE
=300
40 CXXFLAGS.INC
=-Iinclude
-I
$(INCLUDE
) $(CFLAGS
)
43 # Uncomment this for Dell Axim
46 CXXFLAGS
=-nologo
-W3
-Zi
-Od
$(CXXFLAGS.DEF
) $(CXXFLAGS.INC
)
49 ASM
=$(WINE
) -- $(BASE
)\\armasm.exe
50 #ASMFLAGS=-arch 4 -cpu StrongARM1 -32
53 RC
=$(WINE
) -- $(BASE
)\\rc.exe
54 #RCFLAGS=-r -l 0x409 $(CXXFLAGS.DEF) $(CXXFLAGS.INC)
55 RCFLAGS
=$(CXXFLAGS.DEF
) $(CXXFLAGS.INC
)
58 CVTRES
=$(WINE
) -- $(BASE
)\\cvtres.exe
59 CVTRESFLAGS
=-machine
:arm
-windowsce
62 LD
=$(WINE
) -- $(BASE
)\\link.exe
66 # From EVC project settings
70 -stack
:0x10000,0x1000 \
71 -entry
:"WinMainCRTStartup" \
74 -subsystem
:windowsce
,3.0 \
79 #export MSC_CMD_FLAGS=/c
82 #============================================================= Targets ======#
83 all: $(OUT
) $(OUT
)$(TARGETBIN
)
90 # makedep -r $(CXXFLAGS.DEF) $(CXXFLAGS.INC) -p'$$(OUT)' -o.obj src/*.cpp
93 $(OUT
)$(TARGETBIN
): $(OBJS
)
96 #=============================================================== Rules ======#
98 $(CXX
) $(CXXFLAGS
) -Fo
$@
$<
101 $(ASM
) $(ASMFLAGS
) -o
$@
$<
104 $(RC
) $(RCFLAGS
) -fo
$@
$<
106 $(OUT
)%-res.obj
: $(OUT
)%.res
107 $(CVTRES
) $(CVTRESFLAGS
) -out
:$@
$<
110 $(LD
) $(LDFLAGS
) -out
:$@
$(^
) $(LIBS
)