mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-06 06:30:19 +00:00
54b3472ae6
popular formats.
75 lines
2.1 KiB
Plaintext
75 lines
2.1 KiB
Plaintext
--- Makefile.orig Tue Jun 13 07:21:19 2000
|
|
+++ Makefile Tue Jun 20 17:44:24 2000
|
|
@@ -1,11 +1,12 @@
|
|
-CC = gcc
|
|
-CFLAGS = -O2 -I. -Wall
|
|
+CC ?= gcc
|
|
+CFLAGS += -I. -Wall
|
|
|
|
-PREFIX = /usr/local
|
|
+#PREFIX = /usr/local
|
|
AR = ar -cr
|
|
RANLIB = ranlib
|
|
INSTALL = install -c
|
|
RM = rm -f
|
|
+LN = ln -sf
|
|
|
|
OBJS = inflate.o url.o url_file.o url_inflate.o net.o url_buff.o url_ftp.o \
|
|
url_mem.o url_dir.o url_http.o url_pipe.o arc.o arc_lzh.o \
|
|
@@ -14,29 +15,42 @@
|
|
url_hqxdecode.o url_qsdecode.o url_news.o url_newsgroup.o url_cgiesc.o \
|
|
arc_mime.o
|
|
|
|
+SOOBJS = $(OBJS:S/.o/.so/g)
|
|
+
|
|
# readdir_win.o (for Windows)
|
|
|
|
LIB=libarc.a
|
|
+SOLIB=libarc.so
|
|
+SOVERSION?=1
|
|
|
|
-
|
|
-all:: $(LIB)
|
|
+all:: $(LIB) $(SOLIB) arccat
|
|
|
|
$(LIB): $(OBJS)
|
|
$(AR) $@ $(OBJS)
|
|
$(RANLIB) $@
|
|
|
|
-arccat: arccat.o $(LIB)
|
|
- $(CC) -o $@ arccat.o $(LIB)
|
|
+$(SOLIB): $(SOOBJS)
|
|
+ $(CC) -shared -Wl,-soname -Wl,$@.$(SOVERSION) -o $@.$(SOVERSION) $(SOOBJS)
|
|
+ $(LN) $@.$(SOVERSION) $@
|
|
+
|
|
+arccat: arccat.o $(SOLIB)
|
|
+ $(CC) $(CFLAGS) -o $@ arccat.o -L. -larc
|
|
|
|
clean::
|
|
- $(RM) $(LIB) *.o arccat *~ libarc/*~
|
|
+ $(RM) $(LIB) $(SOLIB).$(SOVERSION) *.o *.so arccat *~ libarc/*~
|
|
|
|
-install::
|
|
- test -d $(PREFIX)/lib || mkdir -p $(PREFIX)/lib
|
|
- $(INSTALL) -m 444 $(LIB) $(PREFIX)/lib
|
|
- $(RANLIB) $(PREFIX)/lib/$(LIB)
|
|
+install:: all
|
|
+ $(BSD_INSTALL_PROGRAM) arccat $(PREFIX)/bin
|
|
+ $(BSD_INSTALL_PROGRAM) $(SOLIB).$(SOVERSION) $(PREFIX)/lib
|
|
+ $(LN) $(PREFIX)/lib/$(SOLIB).$(SOVERSION) $(PREFIX)/lib/$(SOLIB)
|
|
+ $(BSD_INSTALL_DATA) $(LIB) $(PREFIX)/lib
|
|
test -d $(PREFIX)/include/libarc || mkdir -p $(PREFIX)/include/libarc
|
|
- $(INSTALL) -m 444 libarc/url.h $(PREFIX)/include/libarc
|
|
- $(INSTALL) -m 444 libarc/arc.h $(PREFIX)/include/libarc
|
|
- $(INSTALL) -m 444 libarc/mblock.h $(PREFIX)/include/libarc
|
|
- $(INSTALL) -m 444 libarc/memb.h $(PREFIX)/include/libarc
|
|
+ $(BSD_INSTALL_DATA) libarc/url.h $(PREFIX)/include/libarc
|
|
+ $(BSD_INSTALL_DATA) libarc/arc.h $(PREFIX)/include/libarc
|
|
+ $(BSD_INSTALL_DATA) libarc/mblock.h $(PREFIX)/include/libarc
|
|
+ $(BSD_INSTALL_DATA) libarc/memb.h $(PREFIX)/include/libarc
|
|
+
|
|
+.SUFFIXES: .so .c
|
|
+
|
|
+.c.so:
|
|
+ $(CC) $(CFLAGS) -fPIC -fpic -DPIC -c $(.IMPSRC) -o $(.TARGET)
|