1#***************************************************************************
2#***
3#***    Copyright 2005  Hon Hai Precision Ind. Co. Ltd.
4#***    All Rights Reserved.
5#***    No portions of this material shall be reproduced in any form without the
6#***    written permission of Hon Hai Precision Ind. Co. Ltd.
7#***
8#***    All information contained in this document is Hon Hai Precision Ind.  
9#***    Co. Ltd. company private, proprietary, and trade secret property and 
10#***    are protected by international intellectual property laws and treaties.
11#***
12#****************************************************************************
13
14include ../config.in
15include ../config.mk
16
17CFLAGS	+= -I. -Wall
18#CFLAGS	+= -g -DDEBUG
19CFLAGS	+= -s -O2
20
21STRIPCMD := $(STRIP) --strip-all --remove-section=.note --remove-section=.comment --remove-section=.pdr
22
23TARGET = ntpclient
24OBJS = ntpclient.o
25
26$(TARGET): $(OBJS)
27	$(CC) -o $@ $^
28	$(STRIPCMD) $@ 
29
30$(OBJS): %.o: %.c
31	$(CC) -c $(CFLAGS) $< -o $@
32
33clean:
34	for i in $(OBJS); do rm -f $$i; done
35	for i in $(OBJS:%.o=.%.depend); do rm -f $$i; done
36	rm -f $(TARGET)
37	
38install: $(TARGET)
39	install -d $(TARGETDIR)/sbin
40	install -m 755 $(TARGET) $(TARGETDIR)/sbin
41	$(STRIP) $(TARGETDIR)/sbin/$(TARGET)
42
43%.o: .%.depend
44.%.depend: %.c
45	$(CC) $(CFLAGS) -M $< > $@
46
47-include $(OBJS:%.o=.%.depend)
48
49