]> git.zerfleddert.de Git - linexec-j720/blame - Makefile
fix asm-location
[linexec-j720] / Makefile
CommitLineData
77a37381 1# Makefile for building PocketPC ARM binary from Linux using wine and EVC
2# By pigeon
3# Inspired by HRET written by anpaza
4# Requires GNU Make, wine, and stuff from EVC, read ReadMe.wine
5
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
9#BASE=d:\\msvc-arm
c475935f 10BASE=d:\\msvc-arm\\bin
77a37381 11
12#=========================================================== Compilers ======#
13# Set some env vars for msvc to use
14WINEPATH=$(BASE)\\
c475935f 15WINE=wine
16export WINEDEBUG=-all
77a37381 17
18# Output directory
19OUT=out/
20
21
22# Makefile.project contains sources, target name, and libs
23include Makefile.project
24
25SUB1 = $(SRCS:.cpp=.obj)
26SUB2 = $(SUB1:.asm=.obj)
27SUB3 = $(SUB2:.rc=.res)
28SUB4 = $(SUB3:%.obj=$(OUT)%.obj)
29OBJS = $(SUB4:%.res=$(OUT)%-res.obj)
30
31
32.SUFFIXES:
33.SUFFIXES: .exe .obj .res .asm -res.obj
34
35
36# You shouldn't need to change anything below.
37
c475935f 38CXX=$(WINE) $(BASE)\\clarm.exe -c
77a37381 39
40CXXFLAGS.DEF=-DARM -D_ARM_ -DUNICODE -D_UNICODE -DUNDER_CE=300 -D_WIN32_WCE=300
41CXXFLAGS.INC=-Iinclude -I$(INCLUDE) $(CFLAGS)
42
43#-Oxs
44# Uncomment this for Dell Axim
45#CXXFLAGS.DEF+=-DAXIM
46
c475935f 47CXXFLAGS=-nologo -W3 $(CXXFLAGS.DEF) $(CXXFLAGS.INC)
77a37381 48
49
c475935f 50ASM=$(WINE) $(BASE)\\armasm.exe
77a37381 51#ASMFLAGS=-arch 4 -cpu StrongARM1 -32
52
53
c475935f 54RC=$(WINE) $(BASE)\\rc.exe
77a37381 55#RCFLAGS=-r -l 0x409 $(CXXFLAGS.DEF) $(CXXFLAGS.INC)
56RCFLAGS=$(CXXFLAGS.DEF) $(CXXFLAGS.INC)
57
58
c475935f 59CVTRES=$(WINE) $(BASE)\\cvtres.exe
77a37381 60CVTRESFLAGS=-machine:arm -windowsce
61
62
c475935f 63LD=$(WINE) $(BASE)\\link.exe
77a37381 64
65
66
67# From EVC project settings
68LDFLAGS= \
69 -nologo \
77a37381 70 -entry:"WinMainCRTStartup" \
71 -align:"4096" \
72 -machine:ARM \
73 -subsystem:windowsce,3.0 \
74 -incremental:yes \
75 -libpath:$(LIB)
76
77
78#export MSC_CMD_FLAGS=/c
79
80
81#============================================================= Targets ======#
82all: $(OUT) $(OUT)$(TARGETBIN)
83
84
85clean:
86 rm -rf $(OUT)
87
88#dep:
89# makedep -r $(CXXFLAGS.DEF) $(CXXFLAGS.INC) -p'$$(OUT)' -o.obj src/*.cpp
90
91
92$(OUT)$(TARGETBIN): $(OBJS)
93
94
95#=============================================================== Rules ======#
96$(OUT)%.obj: %.cpp
97 $(CXX) $(CXXFLAGS) -Fo$@ $<
98
6e6b658b 99$(OUT)%.obj: asm/%.asm
77a37381 100 $(ASM) $(ASMFLAGS) -o $@ $<
101
102$(OUT)%.res: %.rc
103 $(RC) $(RCFLAGS) -fo $@ $<
104
105$(OUT)%-res.obj: $(OUT)%.res
106 $(CVTRES) $(CVTRESFLAGS) -out:$@ $<
107
108$(OUT)%.exe:
109 $(LD) $(LDFLAGS) -out:$@ $(^) $(LIBS)
110
111$(OUT):
112 mkdir $@
113
Impressum, Datenschutz