Browse Subversion Repository
Contents of /trunk/Makefile
Parent Directory
| Revision Log
Revision 22 -
( show annotations)
( download)
Fri Feb 27 14:14:33 2009 UTC
(15 years, 1 month ago)
by hirohitohigashi
File size: 782 byte(s)
added directory management commands.
| 1 |
# Makefile |
| 2 |
# |
| 3 |
# How to run: |
| 4 |
# $ make |
| 5 |
# # make install |
| 6 |
# $ make clean <- clean |
| 7 |
# # make uninstall <- uninstall |
| 8 |
|
| 9 |
INSTDIR = /usr/local |
| 10 |
TARGET = libOftp.a |
| 11 |
|
| 12 |
CFLAGS = -g -Wall -ansi |
| 13 |
#CFLAGS = -g |
| 14 |
ARFLAGS = -rs |
| 15 |
SRCS = sub.c ftp_connect.c ftp_auth.c ftp_passive.c ftp_type.c ftp_quit.c \ |
| 16 |
ftp_delete.c ftp_mkdir.c ftp_rmdir.c ftp_pwd.c ftp_cd.c \ |
| 17 |
ftp_get_buffer.c ftp_put_buffer.c ftp_append_buffer.c |
| 18 |
OBJS = $(SRCS:.c=.o) |
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
$(TARGET): $(OBJS) |
| 23 |
$(AR) $(ARFLAGS) $(TARGET) $(OBJS) |
| 24 |
|
| 25 |
|
| 26 |
all: $(TARGET) example |
| 27 |
|
| 28 |
|
| 29 |
clean: |
| 30 |
@rm -f $(TARGET) $(OBJS) *~ *.core |
| 31 |
|
| 32 |
|
| 33 |
example: example1.c $(TARGET) |
| 34 |
$(CC) $(CFLAGS) -o $@ example1.c $(TARGET) |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
install: $(TARGET) |
| 39 |
cp $(TARGET) $(INSTDIR)/lib/ |
| 40 |
cp liboftp.h $(INSTDIR)/include/ |
| 41 |
|
| 42 |
|
| 43 |
uninstall: |
| 44 |
rm $(INSTDIR)/lib/$(TARGET) |
| 45 |
rm $(INSTDIR)/include/liboftp.h |
|