#*************************************************
# Makefile to build a mds application
#*************************************************

LDAP_DIR = /usr/local/ldap
 
LDAP_LIBS = -L$(LDAP_DIR)/lib 
LDAP_CFLAGS = -I$(LDAP_DIR)/include
LDAP_LDFLAGS =  -lldap -llber 

CFLAGS = -g

#*************************************************

all: add_ns_server

mytest: mytest.o
	$(CC) -o $@ $< $(LDAP_LIBS) $(LDAP_LDFLAGS) 

modifytest: modifytest.o
	$(CC) -o $@ $< $(LDAP_LIBS) $(LDAP_LDFLAGS) 

add_ns_server: add_ns_server.o 
	$(CC) -o $@ $< $(LDAP_LIBS) $(LDAP_LDFLAGS) 

mds_test: mds_test.o
	$(CC) -o mds_test mds_test.o $(LDAP_LIBS) $(LDAP_LDFLAGS) 
 
mds_test.o: mds_test.c
	$(CC) $(LDAP_CFLAGS) -c mds_test.c

.c.o:
	$(CC) $(LDAP_CFLAGS) $(CFLAGS) -c $< -o $@
 
clean:
	rm -f *.o mds_test
