File: Makefile

package info (click to toggle)
gkrellm-volume 2.1.13-1.1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 304 kB
  • ctags: 241
  • sloc: ansic: 1,929; makefile: 68
file content (54 lines) | stat: -rw-r--r-- 1,038 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Makefile for  GKrellM volume plugin

PACKAGE ?= gkrellm-volume
LOCALEDIR ?= /usr/local/share/locale

FLAGS += -DPACKAGE="\"$(PACKAGE)\"" 
export PACKAGE LOCALEDIR

GTK_CONFIG = pkg-config gtk+-2.0

PLUGIN_DIR ?= /usr/local/lib/gkrellm2/plugins
GKRELLM_INCLUDE = -I/usr/local/include

GTK_CFLAGS = `$(GTK_CONFIG) --cflags` 
GTK_LIB = `$(GTK_CONFIG) --libs`

FLAGS = -O2 -Wall -fPIC $(GTK_CFLAGS) $(GKRELLM_INCLUDE)
LIBS = $(GTK_LIB)
LDFLAGS += -shared

OBJS = volume.o mixer.o oss_mixer.o

ifeq ($(enable_alsa),1)
  FLAGS += -DALSA
  LIBS += -lasound
  OBJS += alsa_mixer.o 
endif

ifeq ($(enable_nls),1)
    FLAGS += -DENABLE_NLS -DLOCALEDIR=\"$(LOCALEDIR)\"
    export enable_nls
endif

CC = gcc $(CFLAGS) $(FLAGS)

INSTALL = install -c
INSTALL_PROGRAM = $(INSTALL)

all:	volume.so
	(cd po && ${MAKE} all )

volume.so: $(OBJS)
	$(CC) $(LDFLAGS) $(OBJS) -o volume.so $(LIBS)

clean:
	rm -f *.o core *.so* *.bak *~
	(cd po && ${MAKE} clean)

install: 
	(cd po && ${MAKE} install)
	$(INSTALL_PROGRAM) volume.so $(PLUGIN_DIR)

%.c.o: %.c