]>
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
10 BASE
=d
:\\msvc-arm
\\bin
12 #=========================================================== Compilers ======#
13 # Set some env vars for msvc to use
22 # Makefile.project contains sources, target name, and libs
23 include Makefile.project
25 SUB1
= $(SRCS
:.
cpp=.obj
)
26 SUB2
= $(SUB1
:.asm
=.obj
)
27 SUB3
= $(SUB2
:.rc
=.res
)
28 SUB4
= $(SUB3
:%.obj
=$(OUT
)%.obj
)
29 OBJS
= $(SUB4
:%.res
=$(OUT
)%-res.obj
)
33 .SUFFIXES
: .exe .obj .res .asm
-res.obj
36 # You shouldn't need to change anything below.
38 CXX
=$(WINE
) $(BASE
)\\clarm.exe
-c
40 CXXFLAGS.DEF
=-DARM
-D_ARM_
-DUNICODE
-D_UNICODE
-DUNDER_CE
=300 -D_WIN32_WCE
=300
41 CXXFLAGS.INC
=-Iinclude
-I
$(INCLUDE
) $(CFLAGS
)
44 # Uncomment this for Dell Axim
47 CXXFLAGS
=-nologo
-W3
$(CXXFLAGS.DEF
) $(CXXFLAGS.INC
)
50 ASM
=$(WINE
) $(BASE
)\\armasm.exe
51 #ASMFLAGS=-arch 4 -cpu StrongARM1 -32
54 RC
=$(WINE
) $(BASE
)\\rc.exe
55 #RCFLAGS=-r -l 0x409 $(CXXFLAGS.DEF) $(CXXFLAGS.INC)
56 RCFLAGS
=$(CXXFLAGS.DEF
) $(CXXFLAGS.INC
)
59 CVTRES
=$(WINE
) $(BASE
)\\cvtres.exe
60 CVTRESFLAGS
=-machine
:arm
-windowsce
63 LD
=$(WINE
) $(BASE
)\\link.exe
67 # From EVC project settings
70 -entry
:"WinMainCRTStartup" \
73 -subsystem
:windowsce
,3.0 \
78 #export MSC_CMD_FLAGS=/c
81 #============================================================= Targets ======#
82 all: $(OUT
) $(OUT
)$(TARGETBIN
)
89 # makedep -r $(CXXFLAGS.DEF) $(CXXFLAGS.INC) -p'$$(OUT)' -o.obj src/*.cpp
92 $(OUT
)$(TARGETBIN
): $(OBJS
)
95 #=============================================================== Rules ======#
97 $(CXX
) $(CXXFLAGS
) -Fo
$@
$<
99 $(OUT
)%.obj
: asm
/%.asm
100 $(ASM
) $(ASMFLAGS
) -o
$@
$<
103 $(RC
) $(RCFLAGS
) -fo
$@
$<
105 $(OUT
)%-res.obj
: $(OUT
)%.res
106 $(CVTRES
) $(CVTRESFLAGS
) -out
:$@
$<
109 $(LD
) $(LDFLAGS
) -out
:$@
$(^
) $(LIBS
)