blob: ccde3dd45ce9129c5ccbc3ac6e36a072be1a437d (
plain)
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
|
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
ARCH = $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/)
SHELL = /bin/sh
CC = gcc
STRIP = strip
# Triggering lib64 path from spec file.
ifeq ($(PREFIX)x,x)
PREFIX = $(prefix)/usr
endif
ifeq ($(LIB)x,x)
LIB = lib
endif
LIBDIR = /usr/$(LIB)
bindir = $(PREFIX)/bin
PROGRAMS = fbmngplay fbmngplay.static
OBJECTS = fbmngplay.o messages.o mng.o console.o
LDFLAGS = -L$(LIBDIR)
LIBSS = $(LIBDIR)/libmng.a $(LIBDIR)/libz.a $(LIBDIR)/libjpeg.a -lm
LIBSD = -lmng -lz -lm
CFLAGS = -O2 -Wall
COMPILE = $(CC) $(CFLAGS)
LINKS = $(CC) $(CFLAGS) $(LDFLAGS) -static -o $@
LINKD = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
all: $(PROGRAMS) strip
.SUFFIXES:
.SUFFIXES: .S .c .o .s
.s.o:
$(COMPILE) -c $<
.S.o:
$(COMPILE) -c $<
mostlyclean:
-rm -f *.o core
clean: mostlyclean
-rm -f fbmngplay fbmngplay.static
install:
install -m 755 -d $(bindir)
install -m755 fbmngplay.static $(prefix)/bin
install -m755 fbmngplay $(bindir)
fbmngplay: $(OBJECTS)
@rm -f fbmngplay
$(LINKD) $(LDFLAGS) $(OBJECTS) $(LIBSD)
fbmngplay.static: $(OBJECTS)
@rm -f fbmngplay.static
$(LINKS) $(LDFLAGS) $(OBJECTS) $(LIBSS)
strip: $(PROGRAMS)
$(STRIP) -s $(PROGRAMS)
.PHONY: mostlyclean clean fbmngplay fbmngplay.static all strip
|