File: Makefile.in.svn-base

package info (click to toggle)
gopher 3.0.7sarge2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 5,264 kB
  • ctags: 1,212
  • sloc: ansic: 13,865; sh: 1,448; makefile: 407
file content (86 lines) | stat: -rw-r--r-- 1,835 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH = @srcdir@

include ../Makefile.config


CCFLAGS	= $(OPT) @CFLAGS@ $(INTLOPTS) $(DEBUGGING) $(WAISTYPE) $(SOCKSFLAGS) -I.. -I$(srcdir)  -I$(top_srcdir) 

OBJS	= STRstring.o GDgopherdir.o GSgopherobj.o \
	  DAarray.o   VIews.o       BLblock.o \
	  Sockets.o   util.o        compatible.o \
	  url.o       Debug.o       Regex.o \
	  fileio.o    Locale.o      RBTree.o


TARGET	= libgopher.a libgopher.so.0.1

all: shared $(TARGET)

#
# Make shared library directories
#
shared:
	@-if [ -f /lib/ld.so -a "$(SHAREDLIB)" = "sun" ]; \
	then \
		mkdir shared-sun; \
	fi
	touch shared


.c.o: $(OBJS)
	@CC@ $(CCFLAGS) $(PIC) -c $<
	@-if [ -d shared-sun ]; then \
		echo "Building shared version of $@"; \
		@CC@ $(CCFLAGS) -fPIC -o shared-sun/$@ -c $<; \
	fi

#
# Stuff for shared libraries
#

libgopher.so.0.1: $(OBJS)
	@-if [ -d shared-sun ]; then \
		echo "Building shared library $@"; \
		cd shared-sun; \
		rm -f $@; \
		ld -o $@ -assert pure-text $(OBJS);\
		mv $@ ..; \
	fi

libgopher.sa.0.1: $(OBJS)
	;


libgopher.a: $(OBJS)
	rm -f libgopher.a
	ar rcv libgopher.a $(OBJS)
	@RANLIB@ libgopher.a || true

clean:
	-rm -f $(TARGET) $(OBJS) *.out *~ core TAGS \
	       *.sa.* shared
	-rm -rf shared-sun

GSgopherobj.o:	$(srcdir)/GSgopherobj.h


Locale.o: $(srcdir)/Locale.h $(srcdir)/Locale.c
	@CC@ $(CCFLAGS) $(PIC) -DLOCALEDIR=\"$(CLIENTLIB)/gophernls\" -c $(srcdir)/Locale.c
	@-if [ -d shared-sun ]; then \
		echo "Building shared version of $@"; \
		@CC@ $(CCFLAGS) -DLOCALEDIR=\"$(CLIENTLIB)/gophernls\" \
			-fPIC -o shared-sun/$@ -c $(srcdir)/Locale.c; \
	fi

#
#install shared libraries if need be..
#
install:
	@-if [ -f *.so.* ]; then \
	  echo "Installing Sun shared gopher library" ;\
	  @INSTALL@ libgopher.so.0.1 $(CLIENTLIB); \
	  @INSTALL@ libgopher.a $(CLIENTLIB); \
	fi