My favorites | Sign in
Project Home Wiki Issues Source
Checkout   Browse   Changes  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
all: kbddvp32.dll kbddvp64.dll kbddvp.exe

clean:
-for %a in (res cab exe) do @if exist kbddvp.%a del kbddvp.%a
-for %a in (32 64) do @for %b in (dll obj lib exp) do @if exist kbddvp%a.%b del kbddvp%a.%b
-for %a in (obj exe) do @if exist launcher.%a del launcher.%a

CL32="$(WINDDK)\bin\x86\x86\cl.exe"
LINK32=link -machine:ix86
CL64="$(WINDDK)\bin\x86\amd64\cl.exe"
LINK64=link -machine:amd64

# http://levicki.net/articles/tips/2006/09/29/HOWTO_Build_keyboard_layouts_for_Windows_x64.php
kbddvp64.obj: kbddvp.c
$(CL64) -nologo -c -I..\inc -Zp8 -Gy -W3 -WX -Gz -Gm- -EHs-c- -GR- -GF -Zl -Oxs \
-DBUILD_WOW6432 -D_WIN32_WINNT=0x0501 -Fo$@ $**

kbddvp32.obj: kbddvp.c
$(CL32) -nologo -c -I..\inc -Zp8 -Gy -W3 -WX -Gz -Gm- -EHs-c- -GR- -GF -Zl -Oxs \
-D_WIN32_WINNT=0x0501 -Fo$@ $**

kbddvp.res: kbddvp.rc
rc $**

kbddvp32.dll: kbddvp32.obj kbddvp.res
$(LINK32) -nologo -dll -base:0x5FFF0000 -subsystem:native -def:kbddvp.def -noentry \
-merge:.edata=.data -merge:.rdata=.data -merge:.text=.data -merge:.bss=.data \
-ignore:4078,4070 -section:.data,re -stack:0x40000,0x1000 -opt:ref,icf \
-release -out:$@ $**

# different from the 32-bit version is the base address and the machine flag
kbddvp64.dll: kbddvp64.obj kbddvp.res
$(LINK64) -nologo -dll -base:0x5FFE0000 -subsystem:native -def:kbddvp.def -noentry \
-merge:.edata=.data -merge:.rdata=.data -merge:.text=.data -merge:.bss=.data \
-ignore:4078,4070 -section:.data,re -stack:0x40000,0x1000 -opt:ref,icf \
-release -out:$@ $**

launcher.obj: launcher.c
$(CL32) -nologo -c -Fo$@ $**

launcher.exe: launcher.obj
$(LINK32) -nologo -subsystem:windows -release -nodefaultlib -out:$@ \
$** kernel32.lib libcmt.lib user32.lib shell32.lib

# http://support.microsoft.com/kb/310618
kbddvp.cab: kbddvp32.dll kbddvp64.dll kbddvp.inf launcher.exe
makecab /F makecab-dir.ddf

# http://www.msfn.org/board/SED-INF-DDF-file-format-t49202.html
kbddvp.exe: kbddvp.sed kbddvp.cab
iexpress /N /Q /M kbddvp.sed

Change log

r6 by sense...@sensefulsolutions.com on Aug 5, 2010   Diff
Fixed LNK4224 warning.
Go to: 
Project members, sign in to write a code review

Older revisions

r4 by sense...@sensefulsolutions.com on Aug 5, 2010   Diff
updated link in a comment
r3 by sense...@sensefulsolutions.com on Aug 1, 2010   Diff
Made compilable.
r2 by sense...@sensefulsolutions.com on Jul 28, 2010   Diff
Added files from Programmer Dvorak
All revisions of this file

File info

Size: 2072 bytes, 51 lines
Powered by Google Project Hosting