File: rules1

package info (click to toggle)
glut 3.7-25
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, sarge, squeeze
  • size: 13,036 kB
  • ctags: 47,177
  • sloc: ansic: 148,716; makefile: 44,180; ada: 2,062; yacc: 473; fortran: 290; lex: 131; csh: 52; sed: 49
file content (33 lines) | stat: -rw-r--r-- 779 bytes parent folder | download
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
# make -f rules LIB=glut MAJOR=3 MINOR=7

ifeq ($(LIB),glut)
GLUTLINK=-L/usr/X11R6/lib -lGL -lGLU -lX11 -lXmu -lXi -lm
else
GLUTLINK=
endif

all:
	@echo usage:
	@echo make -f rules1 LIB=foo MAJOR=1 MINOR=0

build:
# build the shared lib
	test -f Makefile
	$(MAKE) clean
	$(MAKE) CCOPTIONS='-ansi -fPIC'
	gcc -shared -Wl,-soname,lib$(LIB).so.$(MAJOR) -o lib$(LIB).so.$(MAJOR).$(MINOR) $(GLUTLINK) *.o
	ln -s lib$(LIB).so.$(MAJOR).$(MINOR) lib$(LIB).so.$(MAJOR)
	ln -s lib$(LIB).so.$(MAJOR).$(MINOR) lib$(LIB).so
# build the static lib
	$(MAKE) clean
	$(MAKE)

clean:
	-$(MAKE) clean
	rm -f lib$(LIB).so*

install:
	install -d $(DESTDIR)/usr/lib
	for l in lib$(LIB).so.$(MAJOR).$(MINOR) lib$(LIB).so.$(MAJOR) lib$(LIB).so lib$(LIB).a; do \
		cp -d $$l $(DESTDIR)/usr/lib ; \
	done