GTK_FLAGS=`pkg-config gtk+-2.0 --cflags` GTK_LIBS=`pkg-config gtk+-2.0 --libs` KRB5LIBS=@KRB5_LIBS@ LDAP_LIBS=@LDAP_LIBS@ LIBS=@LIBS@ -lnetapi -ltdb -ltalloc DEVELOPER_CFLAGS=@DEVELOPER_CFLAGS@ FLAGS=-I../ -L../../../bin @CFLAGS@ $(GTK_FLAGS) CC=@CC@ PICFLAG=@PICFLAG@ LDFLAGS=@PIE_LDFLAGS@ @LDFLAGS@ DYNEXP=@DYNEXP@ NETAPI_LIBS=$(LIBS) $(KRB5LIBS) $(LDAP_LIBS) CMDLINE_LIBS=$(NETAPI_LIBS) @POPTLIBS@ # Compile a source file. COMPILE_CC = $(CC) -I. $(FLAGS) $(PICFLAG) -c $< -o $@ COMPILE = $(COMPILE_CC) PROGS = bin/getdc@EXEEXT@ \ bin/dsgetdc@EXEEXT@ \ bin/netdomjoin@EXEEXT@ \ bin/netdomjoin-gui@EXEEXT@ \ bin/getjoinableous@EXEEXT@ \ bin/user_add@EXEEXT@ \ bin/user_del@EXEEXT@ \ bin/user_enum@EXEEXT@ \ bin/user_dispinfo@EXEEXT@ \ bin/user_chgpwd@EXEEXT@ \ bin/user_getinfo@EXEEXT@ \ bin/user_setinfo@EXEEXT@ \ bin/group_add@EXEEXT@ \ bin/group_del@EXEEXT@ \ bin/group_enum@EXEEXT@ \ bin/group_setinfo@EXEEXT@ \ bin/group_getinfo@EXEEXT@ \ bin/group_adduser@EXEEXT@ \ bin/group_deluser@EXEEXT@ \ bin/group_getusers@EXEEXT@ \ bin/localgroup_add@EXEEXT@ \ bin/localgroup_del@EXEEXT@ \ bin/localgroup_getinfo@EXEEXT@ \ bin/localgroup_setinfo@EXEEXT@ \ bin/localgroup_enum@EXEEXT@ \ bin/remote_tod@EXEEXT@ all: $(PROGS) MAKEDIR = || exec false; \ if test -d "$$dir"; then :; else \ echo mkdir "$$dir"; \ mkdir -p "$$dir" >/dev/null 2>&1 || \ test -d "$$dir" || \ mkdir "$$dir" || \ exec false; fi || exec false BINARY_PREREQS = bin/.dummy bin/.dummy: @if (: >> $@ || : > $@) >/dev/null 2>&1; then :; else \ dir=bin $(MAKEDIR); fi @: >> $@ || : > $@ # what a fancy emoticon! .c.o: @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \ dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi @echo Compiling $*.c @$(COMPILE) && exit 0;\ echo "The following command failed:" 1>&2;\ echo "$(COMPILE_CC)" 1>&2;\ $(COMPILE_CC) >/dev/null 2>&1 CMDLINE_OBJ = common.o GETDC_OBJ = getdc/getdc.o $(CMDLINE_OBJ) DSGETDC_OBJ = dsgetdc/dsgetdc.o $(CMDLINE_OBJ) NETDOMJOIN_OBJ = netdomjoin/netdomjoin.o $(CMDLINE_OBJ) NETDOMJOIN_GUI_OBJ = netdomjoin-gui/netdomjoin-gui.o GETJOINABLEOUS_OBJ = getjoinableous/getjoinableous.o $(CMDLINE_OBJ) USERADD_OBJ = user/user_add.o $(CMDLINE_OBJ) USERDEL_OBJ = user/user_del.o $(CMDLINE_OBJ) USERENUM_OBJ = user/user_enum.o $(CMDLINE_OBJ) USERDISPINFO_OBJ = user/user_dispinfo.o $(CMDLINE_OBJ) USERCHGPWD_OBJ = user/user_chgpwd.o $(CMDLINE_OBJ) USERGETINFO_OBJ = user/user_getinfo.o $(CMDLINE_OBJ) USERSETINFO_OBJ = user/user_setinfo.o $(CMDLINE_OBJ) GROUPADD_OBJ = group/group_add.o $(CMDLINE_OBJ) GROUPDEL_OBJ = group/group_del.o $(CMDLINE_OBJ) GROUPENUM_OBJ = group/group_enum.o $(CMDLINE_OBJ) GROUPSETINFO_OBJ = group/group_setinfo.o $(CMDLINE_OBJ) GROUPGETINFO_OBJ = group/group_getinfo.o $(CMDLINE_OBJ) GROUPADDUSER_OBJ = group/group_adduser.o $(CMDLINE_OBJ) GROUPDELUSER_OBJ = group/group_deluser.o $(CMDLINE_OBJ) GROUPGETUSERS_OBJ = group/group_getusers.o $(CMDLINE_OBJ) LOCALGROUPADD_OBJ = localgroup/localgroup_add.o $(CMDLINE_OBJ) LOCALGROUPDEL_OBJ = localgroup/localgroup_del.o $(CMDLINE_OBJ) LOCALGROUPGETINFO_OBJ = localgroup/localgroup_getinfo.o $(CMDLINE_OBJ) LOCALGROUPSETINFO_OBJ = localgroup/localgroup_setinfo.o $(CMDLINE_OBJ) LOCALGROUPENUM_OBJ = localgroup/localgroup_enum.o $(CMDLINE_OBJ) REMOTETOD_OBJ = server/remote_tod.o $(CMDLINE_OBJ) bin/getdc@EXEEXT@: $(BINARY_PREREQS) $(GETDC_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(GETDC_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/dsgetdc@EXEEXT@: $(BINARY_PREREQS) $(DSGETDC_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(DSGETDC_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/getjoinableous@EXEEXT@: $(BINARY_PREREQS) $(GETJOINABLEOUS_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(GETJOINABLEOUS_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/netdomjoin@EXEEXT@: $(BINARY_PREREQS) $(NETDOMJOIN_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(NETDOMJOIN_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/netdomjoin-gui@EXEEXT@: $(BINARY_PREREQS) $(NETDOMJOIN_GUI_OBJ) @echo Linking $@ @$(CC) $(FLAGS) $(GTK_FLAGS) -o $@ $(NETDOMJOIN_GUI_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) $(KRB5LIBS) $(LDAP_LIBS) $(GTK_LIBS) bin/user_add@EXEEXT@: $(BINARY_PREREQS) $(USERADD_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(USERADD_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/user_del@EXEEXT@: $(BINARY_PREREQS) $(USERDEL_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(USERDEL_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/user_enum@EXEEXT@: $(BINARY_PREREQS) $(USERENUM_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(USERENUM_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/user_dispinfo@EXEEXT@: $(BINARY_PREREQS) $(USERDISPINFO_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(USERDISPINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/user_chgpwd@EXEEXT@: $(BINARY_PREREQS) $(USERCHGPWD_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(USERCHGPWD_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/user_getinfo@EXEEXT@: $(BINARY_PREREQS) $(USERGETINFO_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(USERGETINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/user_setinfo@EXEEXT@: $(BINARY_PREREQS) $(USERSETINFO_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(USERSETINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/group_add@EXEEXT@: $(BINARY_PREREQS) $(GROUPADD_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(GROUPADD_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/group_del@EXEEXT@: $(BINARY_PREREQS) $(GROUPDEL_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(GROUPDEL_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/group_enum@EXEEXT@: $(BINARY_PREREQS) $(GROUPENUM_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(GROUPENUM_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/group_setinfo@EXEEXT@: $(BINARY_PREREQS) $(GROUPSETINFO_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(GROUPSETINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/group_getinfo@EXEEXT@: $(BINARY_PREREQS) $(GROUPGETINFO_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(GROUPGETINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/group_adduser@EXEEXT@: $(BINARY_PREREQS) $(GROUPADDUSER_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(GROUPADDUSER_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/group_deluser@EXEEXT@: $(BINARY_PREREQS) $(GROUPDELUSER_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(GROUPDELUSER_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/group_getusers@EXEEXT@: $(BINARY_PREREQS) $(GROUPGETUSERS_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(GROUPGETUSERS_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/localgroup_add@EXEEXT@: $(BINARY_PREREQS) $(LOCALGROUPADD_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LOCALGROUPADD_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/localgroup_del@EXEEXT@: $(BINARY_PREREQS) $(LOCALGROUPDEL_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LOCALGROUPDEL_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/localgroup_getinfo@EXEEXT@: $(BINARY_PREREQS) $(LOCALGROUPGETINFO_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LOCALGROUPGETINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/localgroup_setinfo@EXEEXT@: $(BINARY_PREREQS) $(LOCALGROUPSETINFO_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LOCALGROUPSETINFO_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/localgroup_enum@EXEEXT@: $(BINARY_PREREQS) $(LOCALGROUPENUM_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(LOCALGROUPENUM_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) bin/remote_tod@EXEEXT@: $(BINARY_PREREQS) $(REMOTETOD_OBJ) @echo Linking $@ @$(CC) $(FLAGS) -o $@ $(REMOTETOD_OBJ) $(LDFLAGS) $(DYNEXP) $(CMDLINE_LIBS) clean: -rm -f $(PROGS) -rm -f core */*~ *~ \ */*.o */*/*.o */*/*/*.o