-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
150 lines (134 loc) · 2.16 KB
/
Makefile
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
default: build
.PHONY: gen
gen:
@goyacc -v midl/y.out -o midl/parse.go -p RPC midl/parse.y
.PHONY: gen-oem
gen-oem:
@go generate ./...
.PHONY: bin
bin:
@mkdir -p bin/
.PHONY: build
build: bin gen
@CGO_ENABLED=0 go build -o bin/parse codegen/main.go
.PHONY: %.idl
%.idl:
@./bin/parse -j $@
.PHONY: %.h
%.h:
@./bin/parse -j $@
.PHONY: test-idl
test-idl:
@for f in $(shell pwd)/idl/*.idl; do ./bin/parse -j $$f &>/dev/null && echo ok $$f || echo fail $$f; done
FORMAT ?= true
MSIDLPATH ?= $(shell pwd)/idl:$(shell pwd)/idl/h
.PHONY: %.go
%.go:
MSIDLPATH=$(MSIDLPATH) ./bin/parse \
-I "github.com/oiweiwei/go-msrpc/msrpc/" \
-dir ./msrpc/ \
-format=$(FORMAT) \
-doc-cache ./.cache/doc/ \
-f "$(basename $@).idl"
.PHONY: %.json
%.json:
MSIDLPATH=$(MSIDLPATH) ./bin/parse \
-j -f "$(basename $@).idl"
.PHONY: all
all:
$(MAKE) build \
adts.go \
adts/claims.go \
bkrp.go \
bpau.go \
brwsa.go \
capr.go \
cmpo.go \
cmrp.go \
dcetypes.go \
dcom.go \
dcom/adtg.go \
dcom/ccfg.go \
dcom/com.go \
dcom/coma.go \
dcom/comev.go \
dcom/comt.go \
dcom/csra.go \
dcom/csvp.go \
dcom/dfsrh.go \
dcom/dmrp.go \
dcom/fsrm.go \
dcom/iisa.go \
dcom/iiss.go \
dcom/imsa.go \
dcom/ioi.go \
dcom/rai.go \
dcom/rdpesc.go \
dcom/oaut.go \
dcom/vds.go \
dcom/wmi.go \
dcom/wcce.go \
dfsnm.go \
dhcpm.go \
dltm.go \
dltw.go \
dnsp.go \
dnsp/record.go \
drsr.go \
dssp.go \
dtyp.go \
eerr.go \
epm.go \
even.go \
even6.go \
fasp.go \
fax.go \
fsrvp.go \
gkdi.go \
icpr.go \
irp.go \
lrec.go \
lsad.go \
lsat.go \
mqds.go \
mqmp.go \
mqmq.go \
mqmr.go \
mqqp.go \
mqrr.go \
msrp.go \
negoex.go \
nrpc.go \
nspi.go \
oxabref.go \
oxcrpc.go \
pac.go \
pan.go \
par.go \
pcq.go \
raa.go \
raiw.go \
rpcl.go \
rprn.go \
rrp.go \
rsp.go \
samr.go \
sch.go \
scmr.go \
srvs.go \
ssp.go \
swn.go \
trp.go \
tsch.go \
tsgu.go \
w32t.go \
wkst.go
.PHONY: test
test:
go test ./example/...
.PHONY: develop-up
vagrant-up:
cd ./develop && vagrant up dc01
.PHONY: develop-provision
vagrant-provision:
cd ./develop && vagrant up dc01 --provision