1 GTK_FLAGS
=`pkg-config gtk+-2.0 --cflags`
2 GTK_LIBS
=`pkg-config gtk+-2.0 --libs`
6 LIBS
=@LIBS@
-lnetapi
-ltdb
-ltalloc
7 DEVELOPER_CFLAGS
=@DEVELOPER_CFLAGS@
8 CCFLAGS
=-I..
/ -L..
/..
/..
/bin @CFLAGS@
$(GTK_FLAGS
)
11 LDFLAGS
=@PIE_LDFLAGS@ @LDFLAGS@
13 NETAPI_LIBS
=$(LIBS
) $(KRB5LIBS
) $(LDAP_LIBS
)
14 CMDLINE_LIBS
=$(NETAPI_LIBS
) @POPTLIBS@
16 # Compile a source file.
17 COMPILE_CC
= $(CC
) -I.
$(CCFLAGS
) $(PICFLAG
) -c
$< -o
$@
18 COMPILE
= $(COMPILE_CC
)
25 bin
/getjoininformation \
38 bin
/user_getlocalgroups \
50 bin
/localgroup_getinfo \
51 bin
/localgroup_setinfo \
53 bin
/localgroup_addmembers \
54 bin
/localgroup_delmembers \
55 bin
/localgroup_setmembers \
56 bin
/localgroup_getmembers \
69 bin
/netlogon_control \
70 bin
/netlogon_control2 \
75 MAKEDIR
= || exec false
; \
76 if
test -d
"$$dir"; then
:; else \
78 mkdir
-p
"$$dir" >/dev
/null
2>&1 || \
81 exec false
; fi || exec false
83 BINARY_PREREQS
= bin
/.dummy
86 @if
(: >> $@ ||
: > $@
) >/dev
/null
2>&1; then
:; else \
87 dir=bin
$(MAKEDIR
); fi
88 @
: >> $@ ||
: > $@
# what a fancy emoticon!
91 @if
(: >> $@ ||
: > $@
) >/dev
/null
2>&1; then
rm -f
$@
; else \
92 dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR
); fi
94 @
$(COMPILE
) && exit
0;\
95 echo
"The following command failed:" 1>&2;\
96 echo
"$(COMPILE_CC)" 1>&2;\
97 $(COMPILE_CC
) >/dev
/null
2>&1
99 CMDLINE_OBJ
= common.o
100 GETDC_OBJ
= getdc
/getdc.o
$(CMDLINE_OBJ
)
101 DSGETDC_OBJ
= dsgetdc
/dsgetdc.o
$(CMDLINE_OBJ
)
102 NETDOMJOIN_OBJ
= join/netdomjoin.o
$(CMDLINE_OBJ
)
103 NETDOMJOIN_GUI_OBJ
= netdomjoin-gui
/netdomjoin-gui.o
104 GETJOINABLEOUS_OBJ
= join/getjoinableous.o
$(CMDLINE_OBJ
)
105 GETJOININFORMATION_OBJ
= join/getjoininformation.o
$(CMDLINE_OBJ
)
106 RENAMEMACHINE_OBJ
= join/rename_machine.o
$(CMDLINE_OBJ
)
107 USERADD_OBJ
= user
/user_add.o
$(CMDLINE_OBJ
)
108 USERDEL_OBJ
= user
/user_del.o
$(CMDLINE_OBJ
)
109 USERENUM_OBJ
= user
/user_enum.o
$(CMDLINE_OBJ
)
110 USERDISPINFO_OBJ
= user
/user_dispinfo.o
$(CMDLINE_OBJ
)
111 USERCHGPWD_OBJ
= user
/user_chgpwd.o
$(CMDLINE_OBJ
)
112 USERGETINFO_OBJ
= user
/user_getinfo.o
$(CMDLINE_OBJ
)
113 USERSETINFO_OBJ
= user
/user_setinfo.o
$(CMDLINE_OBJ
)
114 USERMODALSGET_OBJ
= user
/user_modalsget.o
$(CMDLINE_OBJ
)
115 USERMODALSSET_OBJ
= user
/user_modalsset.o
$(CMDLINE_OBJ
)
116 USERGETGROUPS_OBJ
= user
/user_getgroups.o
$(CMDLINE_OBJ
)
117 USERSETGROUPS_OBJ
= user
/user_setgroups.o
$(CMDLINE_OBJ
)
118 USERGETLOCALGROUPS_OBJ
= user
/user_getlocalgroups.o
$(CMDLINE_OBJ
)
119 GROUPADD_OBJ
= group
/group_add.o
$(CMDLINE_OBJ
)
120 GROUPDEL_OBJ
= group
/group_del.o
$(CMDLINE_OBJ
)
121 GROUPENUM_OBJ
= group
/group_enum.o
$(CMDLINE_OBJ
)
122 GROUPSETINFO_OBJ
= group
/group_setinfo.o
$(CMDLINE_OBJ
)
123 GROUPGETINFO_OBJ
= group
/group_getinfo.o
$(CMDLINE_OBJ
)
124 GROUPADDUSER_OBJ
= group
/group_adduser.o
$(CMDLINE_OBJ
)
125 GROUPDELUSER_OBJ
= group
/group_deluser.o
$(CMDLINE_OBJ
)
126 GROUPGETUSERS_OBJ
= group
/group_getusers.o
$(CMDLINE_OBJ
)
127 GROUPSETUSERS_OBJ
= group
/group_setusers.o
$(CMDLINE_OBJ
)
128 LOCALGROUPADD_OBJ
= localgroup
/localgroup_add.o
$(CMDLINE_OBJ
)
129 LOCALGROUPDEL_OBJ
= localgroup
/localgroup_del.o
$(CMDLINE_OBJ
)
130 LOCALGROUPGETINFO_OBJ
= localgroup
/localgroup_getinfo.o
$(CMDLINE_OBJ
)
131 LOCALGROUPSETINFO_OBJ
= localgroup
/localgroup_setinfo.o
$(CMDLINE_OBJ
)
132 LOCALGROUPENUM_OBJ
= localgroup
/localgroup_enum.o
$(CMDLINE_OBJ
)
133 LOCALGROUPADDMEMBERS_OBJ
= localgroup
/localgroup_addmembers.o
$(CMDLINE_OBJ
)
134 LOCALGROUPDELMEMBERS_OBJ
= localgroup
/localgroup_delmembers.o
$(CMDLINE_OBJ
)
135 LOCALGROUPSETMEMBERS_OBJ
= localgroup
/localgroup_setmembers.o
$(CMDLINE_OBJ
)
136 LOCALGROUPGETMEMBERS_OBJ
= localgroup
/localgroup_getmembers.o
$(CMDLINE_OBJ
)
137 REMOTETOD_OBJ
= server
/remote_tod.o
$(CMDLINE_OBJ
)
138 SERVERGETINFO_OBJ
= server
/server_getinfo.o
$(CMDLINE_OBJ
)
139 SHAREADD_OBJ
= share
/share_add.o
$(CMDLINE_OBJ
)
140 SHAREDEL_OBJ
= share
/share_del.o
$(CMDLINE_OBJ
)
141 SHAREENUM_OBJ
= share
/share_enum.o
$(CMDLINE_OBJ
)
142 SHAREGETINFO_OBJ
= share
/share_getinfo.o
$(CMDLINE_OBJ
)
143 SHARESETINFO_OBJ
= share
/share_setinfo.o
$(CMDLINE_OBJ
)
144 FILECLOSE_OBJ
= file
/file_close.o
$(CMDLINE_OBJ
)
145 FILEGETINFO_OBJ
= file
/file_getinfo.o
$(CMDLINE_OBJ
)
146 FILEENUM_OBJ
= file
/file_enum.o
$(CMDLINE_OBJ
)
147 SHUTDOWNINIT_OBJ
= shutdown
/shutdown_init.o
$(CMDLINE_OBJ
)
148 SHUTDOWNABORT_OBJ
= shutdown
/shutdown_abort.o
$(CMDLINE_OBJ
)
149 NETLOGONCONTROL_OBJ
= netlogon
/netlogon_control.o
$(CMDLINE_OBJ
)
150 NETLOGONCONTROL2_OBJ
= netlogon
/netlogon_control2.o
$(CMDLINE_OBJ
)
151 NLTEST_OBJ
= netlogon
/nltest.o
$(CMDLINE_OBJ
)
153 bin
/getdc
: $(BINARY_PREREQS
) $(GETDC_OBJ
)
155 @
$(CC
) $(CCFLAGS
) -o
$@
$(GETDC_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
157 bin
/dsgetdc
: $(BINARY_PREREQS
) $(DSGETDC_OBJ
)
159 @
$(CC
) $(CCFLAGS
) -o
$@
$(DSGETDC_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
161 bin
/getjoinableous
: $(BINARY_PREREQS
) $(GETJOINABLEOUS_OBJ
)
163 @
$(CC
) $(CCFLAGS
) -o
$@
$(GETJOINABLEOUS_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
165 bin
/getjoininformation
: $(BINARY_PREREQS
) $(GETJOININFORMATION_OBJ
)
167 @
$(CC
) $(CCFLAGS
) -o
$@
$(GETJOININFORMATION_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
169 bin
/rename_machine
: $(BINARY_PREREQS
) $(RENAMEMACHINE_OBJ
)
171 @
$(CC
) $(CCFLAGS
) -o
$@
$(RENAMEMACHINE_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
173 bin
/netdomjoin
: $(BINARY_PREREQS
) $(NETDOMJOIN_OBJ
)
175 @
$(CC
) $(CCFLAGS
) -o
$@
$(NETDOMJOIN_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
177 bin
/netdomjoin-gui
: $(BINARY_PREREQS
) $(NETDOMJOIN_GUI_OBJ
)
179 @
$(CC
) $(CCFLAGS
) $(GTK_FLAGS
) -o
$@
$(NETDOMJOIN_GUI_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(LIBS
) $(KRB5LIBS
) $(LDAP_LIBS
) $(GTK_LIBS
)
181 bin
/user_add
: $(BINARY_PREREQS
) $(USERADD_OBJ
)
183 @
$(CC
) $(CCFLAGS
) -o
$@
$(USERADD_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
185 bin
/user_del
: $(BINARY_PREREQS
) $(USERDEL_OBJ
)
187 @
$(CC
) $(CCFLAGS
) -o
$@
$(USERDEL_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
189 bin
/user_enum
: $(BINARY_PREREQS
) $(USERENUM_OBJ
)
191 @
$(CC
) $(CCFLAGS
) -o
$@
$(USERENUM_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
193 bin
/user_dispinfo
: $(BINARY_PREREQS
) $(USERDISPINFO_OBJ
)
195 @
$(CC
) $(CCFLAGS
) -o
$@
$(USERDISPINFO_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
197 bin
/user_chgpwd
: $(BINARY_PREREQS
) $(USERCHGPWD_OBJ
)
199 @
$(CC
) $(CCFLAGS
) -o
$@
$(USERCHGPWD_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
201 bin
/user_getinfo
: $(BINARY_PREREQS
) $(USERGETINFO_OBJ
)
203 @
$(CC
) $(CCFLAGS
) -o
$@
$(USERGETINFO_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
205 bin
/user_setinfo
: $(BINARY_PREREQS
) $(USERSETINFO_OBJ
)
207 @
$(CC
) $(CCFLAGS
) -o
$@
$(USERSETINFO_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
209 bin
/user_modalsget
: $(BINARY_PREREQS
) $(USERMODALSGET_OBJ
)
211 @
$(CC
) $(CCFLAGS
) -o
$@
$(USERMODALSGET_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
213 bin
/user_modalsset
: $(BINARY_PREREQS
) $(USERMODALSSET_OBJ
)
215 @
$(CC
) $(CCFLAGS
) -o
$@
$(USERMODALSSET_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
217 bin
/user_getgroups
: $(BINARY_PREREQS
) $(USERGETGROUPS_OBJ
)
219 @
$(CC
) $(CCFLAGS
) -o
$@
$(USERGETGROUPS_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
221 bin
/user_setgroups
: $(BINARY_PREREQS
) $(USERSETGROUPS_OBJ
)
223 @
$(CC
) $(CCFLAGS
) -o
$@
$(USERSETGROUPS_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
225 bin
/user_getlocalgroups
: $(BINARY_PREREQS
) $(USERGETLOCALGROUPS_OBJ
)
227 @
$(CC
) $(CCFLAGS
) -o
$@
$(USERGETLOCALGROUPS_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
229 bin
/group_add
: $(BINARY_PREREQS
) $(GROUPADD_OBJ
)
231 @
$(CC
) $(CCFLAGS
) -o
$@
$(GROUPADD_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
233 bin
/group_del
: $(BINARY_PREREQS
) $(GROUPDEL_OBJ
)
235 @
$(CC
) $(CCFLAGS
) -o
$@
$(GROUPDEL_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
237 bin
/group_enum
: $(BINARY_PREREQS
) $(GROUPENUM_OBJ
)
239 @
$(CC
) $(CCFLAGS
) -o
$@
$(GROUPENUM_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
241 bin
/group_setinfo
: $(BINARY_PREREQS
) $(GROUPSETINFO_OBJ
)
243 @
$(CC
) $(CCFLAGS
) -o
$@
$(GROUPSETINFO_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
245 bin
/group_getinfo
: $(BINARY_PREREQS
) $(GROUPGETINFO_OBJ
)
247 @
$(CC
) $(CCFLAGS
) -o
$@
$(GROUPGETINFO_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
249 bin
/group_adduser
: $(BINARY_PREREQS
) $(GROUPADDUSER_OBJ
)
251 @
$(CC
) $(CCFLAGS
) -o
$@
$(GROUPADDUSER_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
253 bin
/group_deluser
: $(BINARY_PREREQS
) $(GROUPDELUSER_OBJ
)
255 @
$(CC
) $(CCFLAGS
) -o
$@
$(GROUPDELUSER_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
257 bin
/group_getusers
: $(BINARY_PREREQS
) $(GROUPGETUSERS_OBJ
)
259 @
$(CC
) $(CCFLAGS
) -o
$@
$(GROUPGETUSERS_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
261 bin
/group_setusers
: $(BINARY_PREREQS
) $(GROUPSETUSERS_OBJ
)
263 @
$(CC
) $(CCFLAGS
) -o
$@
$(GROUPSETUSERS_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
265 bin
/localgroup_add
: $(BINARY_PREREQS
) $(LOCALGROUPADD_OBJ
)
267 @
$(CC
) $(CCFLAGS
) -o
$@
$(LOCALGROUPADD_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
269 bin
/localgroup_del
: $(BINARY_PREREQS
) $(LOCALGROUPDEL_OBJ
)
271 @
$(CC
) $(CCFLAGS
) -o
$@
$(LOCALGROUPDEL_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
273 bin
/localgroup_getinfo
: $(BINARY_PREREQS
) $(LOCALGROUPGETINFO_OBJ
)
275 @
$(CC
) $(CCFLAGS
) -o
$@
$(LOCALGROUPGETINFO_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
277 bin
/localgroup_setinfo
: $(BINARY_PREREQS
) $(LOCALGROUPSETINFO_OBJ
)
279 @
$(CC
) $(CCFLAGS
) -o
$@
$(LOCALGROUPSETINFO_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
281 bin
/localgroup_enum
: $(BINARY_PREREQS
) $(LOCALGROUPENUM_OBJ
)
283 @
$(CC
) $(CCFLAGS
) -o
$@
$(LOCALGROUPENUM_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
285 bin
/localgroup_addmembers
: $(BINARY_PREREQS
) $(LOCALGROUPADDMEMBERS_OBJ
)
287 @
$(CC
) $(CCFLAGS
) -o
$@
$(LOCALGROUPADDMEMBERS_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
289 bin
/localgroup_delmembers
: $(BINARY_PREREQS
) $(LOCALGROUPDELMEMBERS_OBJ
)
291 @
$(CC
) $(CCFLAGS
) -o
$@
$(LOCALGROUPDELMEMBERS_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
293 bin
/localgroup_setmembers
: $(BINARY_PREREQS
) $(LOCALGROUPSETMEMBERS_OBJ
)
295 @
$(CC
) $(CCFLAGS
) -o
$@
$(LOCALGROUPSETMEMBERS_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
297 bin
/localgroup_getmembers
: $(BINARY_PREREQS
) $(LOCALGROUPGETMEMBERS_OBJ
)
299 @
$(CC
) $(CCFLAGS
) -o
$@
$(LOCALGROUPGETMEMBERS_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
301 bin
/remote_tod
: $(BINARY_PREREQS
) $(REMOTETOD_OBJ
)
303 @
$(CC
) $(CCFLAGS
) -o
$@
$(REMOTETOD_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
305 bin
/server_getinfo
: $(BINARY_PREREQS
) $(SERVERGETINFO_OBJ
)
307 @
$(CC
) $(CCFLAGS
) -o
$@
$(SERVERGETINFO_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
309 bin
/share_add
: $(BINARY_PREREQS
) $(SHAREADD_OBJ
)
311 @
$(CC
) $(CCFLAGS
) -o
$@
$(SHAREADD_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
313 bin
/share_del
: $(BINARY_PREREQS
) $(SHAREDEL_OBJ
)
315 @
$(CC
) $(CCFLAGS
) -o
$@
$(SHAREDEL_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
317 bin
/share_enum
: $(BINARY_PREREQS
) $(SHAREENUM_OBJ
)
319 @
$(CC
) $(CCFLAGS
) -o
$@
$(SHAREENUM_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
321 bin
/share_getinfo
: $(BINARY_PREREQS
) $(SHAREGETINFO_OBJ
)
323 @
$(CC
) $(CCFLAGS
) -o
$@
$(SHAREGETINFO_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
325 bin
/share_setinfo
: $(BINARY_PREREQS
) $(SHARESETINFO_OBJ
)
327 @
$(CC
) $(CCFLAGS
) -o
$@
$(SHARESETINFO_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
329 bin
/file_close
: $(BINARY_PREREQS
) $(FILECLOSE_OBJ
)
331 @
$(CC
) $(CCFLAGS
) -o
$@
$(FILECLOSE_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
333 bin
/file_getinfo
: $(BINARY_PREREQS
) $(FILEGETINFO_OBJ
)
335 @
$(CC
) $(CCFLAGS
) -o
$@
$(FILEGETINFO_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
337 bin
/file_enum
: $(BINARY_PREREQS
) $(FILEENUM_OBJ
)
339 @
$(CC
) $(CCFLAGS
) -o
$@
$(FILEENUM_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
341 bin
/shutdown_init
: $(BINARY_PREREQS
) $(SHUTDOWNINIT_OBJ
)
343 @
$(CC
) $(CCFLAGS
) -o
$@
$(SHUTDOWNINIT_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
345 bin
/shutdown_abort
: $(BINARY_PREREQS
) $(SHUTDOWNABORT_OBJ
)
347 @
$(CC
) $(CCFLAGS
) -o
$@
$(SHUTDOWNABORT_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
349 bin
/netlogon_control
: $(BINARY_PREREQS
) $(NETLOGONCONTROL_OBJ
)
351 @
$(CC
) $(CCFLAGS
) -o
$@
$(NETLOGONCONTROL_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
353 bin
/netlogon_control2
: $(BINARY_PREREQS
) $(NETLOGONCONTROL2_OBJ
)
355 @
$(CC
) $(CCFLAGS
) -o
$@
$(NETLOGONCONTROL2_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
357 bin
/nltest
: $(BINARY_PREREQS
) $(NLTEST_OBJ
)
359 @
$(CC
) $(CCFLAGS
) -o
$@
$(NLTEST_OBJ
) $(LDFLAGS
) $(DYNEXP
) $(CMDLINE_LIBS
)
363 -rm -f core
*/*~
*~ \
364 */*.o
*/*/*.o
*/*/*/*.o