aboutsummaryrefslogtreecommitdiff
path: root/vendor/voclient/libvo/Makefile
blob: 8c60aeebd187131f726ca990ccd138b2d175e310 (plain) (blame)
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#///////////////////////////////////////////////////////////////////////////////
#//
#//  Makefile for the VO Uber-library
#//
#///////////////////////////////////////////////////////////////////////////////

# primary dependencies

NAME       	 = VO
VERSION    	 = 1.0
PLATFORM  	:= $(shell uname -s)
PLMACH  	:= $(shell uname -m)
HERE      	:= $(shell /bin/pwd)
BINDIR    	:= ../bin/
LIBDIR    	:= ../lib/
INCDIR    	:= ../include/


# secondary dependencies

LIBBASE		= lib$(NAME)
STATICLIB 	= $(LIBDIR)/$(LIBBASE).a
SHAREDLIB 	= $(LIBDIR)/$(LIBBASE).so.$(VERSION)


# includes, flags and libraries
CC              = gcc
CINCS           = -I$(INCDIR)  -I.

CLIBS		= -lm -lc -lcurl -lpthread
CARCH		= -m64 -mmacosx-version-min=10.5

CFLAGS 		= -g -Wall $(CARCH) -D$(PLATFORM) $(CINCS) -L./



# list of source and include files
SRCS 		= 
OBJS 		= 
INCS 		= 
LIBS		=
APPS		=


all:	lib

World:	lib

install: all
	mv lib$(NAME).a $(LIBDIR)

objs:	$(OBJS) $(INCS)

clean:
	/bin/rm -f *.o *.a *.e *.so .BASE



####################################
#  Apps
####################################

zztest: zztest.o $(OBJS)
	$(CC) $(CFLAGS) -o zztest zztest.o $(LFLAGS) $(LIBS)



####################################
#  LIBVO dependency libraries.
####################################

lib: objs $(INCS)
	ar x ../lib/libsamp.a
	ar x ../lib/libVOTable.a
	ar x ../lib/libVOClient.a
	ar x ../lib/libVOApps.a
	(if [ "$(PLATFORM)" != "Darwin" ]; then ar x ../lib/libcurl.a; fi)
	chmod 644 *.o
	ar rv libVO.a *.o
	/bin/rm -f *.o __*




###############################################################################
# Leave this stuff alone.
###############################################################################

$(STATICLIB): $(SRCS:%.c=Static/%.o)
	/usr/bin/ar r $@ $?
Static/%.o: %.c $(INCS)
	/usr/bin/gcc $(CINCS) $(CFLAGS) -c $< -o $@
Static:
	/bin/mkdir $@
	chmod 777 $@

$(SHAREDLIB): $(SRCS:%.c=Shared/%.o)
	/usr/bin/ld -shared -o $@ $? -lc -ldl
Shared/%.o: %.c $(INCS)
	/usr/bin/gcc $(CINCS) $(CFLAGS) -fpic -shared -c $< -o $@
Shared:
	/bin/mkdir $@
	chmod 777 $@