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 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397
|
##########################################################################
# $Id: Makefile,v 1.42 2001/05/17 16:49:50 dpotter Exp $
#
# Makefile -- for building irmp3
#
# Copyright (C) by Andreas Neuhaus <andy@fasta.fh-dortmund.de>
# and David Potter <dp-irmp3@dpotter.com>
##########################################################################
# CONFIGURATION (change to your needs before doing "make all")
#
#-------------------------------------------------------------------------
# General settings:
# Specify install paths and compiler flags
# Edited for Debian GNU/Linux
DESTDIR =
# Install destination paths
PREFIX = /usr/local
BINDIR = $(DESTDIR)/usr/bin
SBINDIR = $(DESTDIR)/usr/sbin
SHAREDIR = $(DESTDIR)/usr/share/irmp3
SOUNDSHAREDIR = $(DESTDIR)/usr/share/sounds/irmp3
CONFDIR = $(DESTDIR)/etc/irmp3
# Compiler/linker settings
CC = gcc
LD = ld
EXTRA_CFLAGS = -O3 -m486
#EXTRA_CFLAGS = -O3 -m486 -g
EXTRA_LDFLAGS =
#EXTRA_LDFLAGS = -g
#-------------------------------------------------------------------------
# MPG123 module:
# For playing mp3 files and streams
# You need the external program mpg123. See README.
# Undefine this if you don't want MPG123 support
MOD_MPG123 = 1
# Player binary (usually mpg123)
# if mpg123 is not in the path, put the whole pathname here
# e.g. /usr/local/bin/mpg123
MOD_MPG123_BIN = /etc/alternatives/mpg123
#-------------------------------------------------------------------------
# PLAYLIST module:
# For playing more than one song in a row. Supports
# Loading playlists from file, scanning dirs/subdirs,
# shuffle and repeat function.
# Undefine this if you don't want playlist support
MOD_PLAYLIST = 1
#-------------------------------------------------------------------------
# PLAYLISTLIST module:
# For loading a list of playlists. That way we can go backward
# and forward through our playlists.
# Undefine this if you don't want playlistlist support
MOD_PLAYLISTLIST = 1
#-------------------------------------------------------------------------
# BEEP module:
# Provides optional audible beeps for keypresses
# Requires a secondary DSP device and a program to play
# soundfiles (like sox)
#
# This module currently only makes noise for sleep
# and shuffle commands.
# Undefine this if you don't want any beeps.
MOD_BEEP = 1
#-------------------------------------------------------------------------
# MIXER module:
# For controlling mixer settings (volume, etc).
# Undefine this if you don't want mixer support
MOD_MIXER = 1
# The mixer device (usually /dev/mixer)
MOD_MIXER_DEV = /dev/mixer
#-------------------------------------------------------------------------
# ENV module:
# Provides "environment" settings. This allows you to
# execute several IRMP3 commands at once to set up a
# specific environment.
#
# For example, I use a "bedtime environment" to set a
# low volume, sleep mode on, shuffle on, and load a relaxing
# playlist.
# Undefine this if you don't want environment support.
MOD_ENV = 1
#-------------------------------------------------------------------------
# TIMER module:
# A sleep timer which can fade-out and stop playing
# after a specified amount of time.
# Undefine this if you don't want timer support
MOD_TIMER = 1
#-------------------------------------------------------------------------
# ALARM module:
# A module which can act as an alarm clock.
# It receives a SIG_USR1 or SIG_USR2 signal from an external process
# (like cron) and executes an environment named
# "alarm". It requires MOD_ENV.
# Undefine this if you don't want alarm support
MOD_ALARM = 1
#-------------------------------------------------------------------------
# LIRC module:
# For controlling IRMP3 with an IR remote control
# You need the external program LIRC. See README.
# Undefine this if you don't want LIRC support
MOD_LIRC = 1
# Comment this out if you have LIRC version 0.5.x
MOD_LIRC_V06 = 1
# We need the path where to find LIRC (only for 0.5.x)
# MOD_LIRC_DIR = ../lirc-0.5.4
#-------------------------------------------------------------------------
# LCDproc module:
# For use of an LCDisplay for output and optionally keypad input
# You need the external program LCDproc. See README.
# Undefine this if you don't want LCDproc support
MOD_LCDPROC = 1
# If this is set to 1, IRMP3 will not try to display a character at the
# upper right corner of the display, because the LCDproc heartbeat
# is displayed there
MOD_LCDPROC_PRESERVEUPPERRIGHT = 1
#-------------------------------------------------------------------------
# CD module
MOD_CD = 1
#-------------------------------------------------------------------------
# NETCTL module:
# Turns IRMP3 into a network server. Clients can attach to
# this server to monitor the status of IRMP3 and/or control it.
# (experimental)
# Undefine this if you don't want to be a network server
MOD_NETCTL=1
#
# Maximum number of simultaneously attached clients
MOD_NETCTL_MAXCLIENTS=15
#-------------------------------------------------------------------------
# IDLE module:
# Announces idle time to other modules
# Define this if you want IRMP3 to use mod_autoshutdown or if you
# want to enable clock functionality on the LCD display
MOD_IDLE=1
#-------------------------------------------------------------------------
# AUTOSHUTDOWN module:
# Automatically terminates IRMP3 after a period of inactivity.
# Requires mod_idle!
# Define this if you want IRMP3 to automatically shut down
#MOD_AUTOSHUTDOWN=1
#-------------------------------------------------------------------------
# SAVE module:
# Saves last played song or playlist (with song within that playlist)
# and position (time) in that song, so that when IRMP3 is restarted
# it'll start playing the last played song (or song withing playlist)
# at the exact time where it stopped.
# Especially useful for those using IRMP3 in car jukeboxes.
# Undefine this if you don't want IRMP3 to save the last played
# song/playlist.
MOD_SAVE = 1
#-------------------------------------------------------------------------
# Debug module:
# For debugging purpose
# Defining this module will include support for debug output
# and forground operation of IRMP3 (with stdin command control).
#
# check the -f and -v cmdline parameters.
# MOD_DEBUG = 1
##########################################################################
# STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP STOP
# You shouldn't need to edit anything beyond this line!
#
#-------------------------------------------------------------------------
# Target configuration
VERSION = 0.4.3pre6
CFLAGS = -Wall -fno-builtin $(EXTRA_CFLAGS)
LDFLAGS = $(EXTRA_LDFLAGS)
OBJS = irmp3.o tools.o log.o config.o mod.o
MODS =
ifdef MOD_MPG123
OBJS += mod_mpg123.o
MODS += -DMOD_MPG123
endif
ifdef MOD_PLAYLIST
OBJS += mod_playlist.o
MODS += -DMOD_PLAYLIST
endif
ifdef MOD_PLAYLISTLIST
OBJS += mod_playlistlist.o
MODS += -DMOD_PLAYLISTLIST
endif
ifdef MOD_BEEP
OBJS += mod_beep.o
MODS += -DMOD_BEEP
endif
ifdef MOD_MIXER
OBJS += mod_mixer.o
MODS += -DMOD_MIXER
endif
ifdef MOD_ENV
OBJS += mod_env.o
MODS += -DMOD_ENV
endif
ifdef MOD_TIMER
OBJS += mod_timer.o
MODS += -DMOD_TIMER
endif
ifdef MOD_ALARM
OBJS += mod_alarm.o
MODS += -DMOD_ALARM
endif
ifdef MOD_LIRC
ifdef MOD_LIRC_V06
OBJS += mod_lirc.o
LDFLAGS += -llirc_client
else
OBJS += $(MOD_LIRC_DIR)/tools/lirc_client.o mod_lirc.o
endif
MODS += -DMOD_LIRC
endif
ifdef MOD_LCDPROC
OBJS += mod_lcdproc.o
MODS += -DMOD_LCDPROC
endif
ifdef MOD_NETCTL
OBJS += mod_netctl.o
MODS += -DMOD_NETCTL
endif
ifdef MOD_IDLE
OBJS += mod_idle.o
MODS += -DMOD_IDLE
endif
ifdef MOD_AUTOSHUTDOWN
OBJS += mod_autoshutdown.o
MODS += -DMOD_AUTOSHUTDOWN
endif
ifdef MOD_CD
OBJS += mod_cd.o
MODS += -DMOD_CD
endif
ifdef MOD_SAVE
OBJS += mod_save.o
MODS += -DMOD_SAVE
endif
ifdef MOD_DEBUG
OBJS += mod_debug.o
MODS += -DMOD_DEBUG
endif
#-------------------------------------------------------------------------
# Main Targets
all: irmp3-target
install:irmp3-target
install -m 755 -o root -g root -s irmp3 $(BINDIR)
install -d -m 755 -o root -g root $(CONFDIR)
if [ ! -f $(CONFDIR)/irmp3.conf ]; then install -m 644 -o root -g root examples/irmp3.conf $(CONFDIR); fi
#if [ ! -f $(CONFDIR)/lirc.conf ]; then install -m 644 -o root -g root examples/lircrc.advanced $(CONFDIR)/lirc.conf; fi
install -d -m 755 -o root -g root $(SOUNDSHAREDIR)
install -m 644 -o root -g root share/*.au $(SOUNDSHAREDIR)
#install -d $(DESTDIR)/usr/share/doc/irmp3
#cp COMMANDS CONFIG DEVELOPER FAQ HISTORY PROBLEMS README TODO $(DESTDIR)/usr/share/doc/irmp3
clean:
rm -f *.o *core *~ irmp3
dist: clean
tar -C .. -zcf ../irmp3-$(VERSION).tar.gz --exclude=*.log --exclude=*.m3u --exclude=*.mp3 irmp3
tar -ztf ../irmp3-$(VERSION).tar.gz
#-------------------------------------------------------------------------
# Core Targets
irmp3-target: $(OBJS)
$(CC) $(LDFLAGS) -o irmp3 $(OBJS)
irmp3.o: irmp3.c
$(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" -c irmp3.c -o irmp3.o
tools.o: tools.c
$(CC) $(CFLAGS) -c tools.c -o tools.o
log.o: log.c
$(CC) $(CFLAGS) -c log.c -o log.o
config.o: config.c
$(CC) $(CFLAGS) -c config.c -o config.o
mod.o: mod.c modules.inc
$(CC) $(CFLAGS) $(MODS) -c mod.c -o mod.o
#-------------------------------------------------------------------------
# Module Targets
mod_mpg123.o: mod_mpg123.c
$(CC) $(CFLAGS) -DMOD_NETCTL=0$(MOD_NETCTL) -DMOD_NETCTL_MAXCLIENTS=$(MOD_NETCTL_MAXCLIENTS) -DMOD_MPG123_BIN=\"$(MOD_MPG123_BIN)\" -c mod_mpg123.c -o mod_mpg123.o
mod_playlist.o: mod_playlist.c
$(CC) $(CFLAGS) -c mod_playlist.c -o mod_playlist.o
mod_playlistlist.o: mod_playlistlist.c
$(CC) $(CFLAGS) -c mod_playlistlist.c -o mod_playlistlist.o
mod_beep.o: mod_beep.c
$(CC) $(CFLAGS) -c mod_beep.c -o mod_beep.o
mod_mixer.o: mod_mixer.c
$(CC) $(CFLAGS) -DMOD_MIXER_DEV=\"$(MOD_MIXER_DEV)\" -c mod_mixer.c -o mod_mixer.o
mod_env.o: mod_env.c
$(CC) $(CFLAGS) -c mod_env.c -o mod_env.o
mod_timer.o: mod_timer.c
$(CC) $(CFLAGS) -c mod_timer.c -o mod_timer.o
mod_alarm.o: mod_alarm.c
$(CC) $(CFLAGS) -c mod_alarm.c -o mod_alarm.o
mod_lirc.o: mod_lirc.c
ifdef MOD_LIRC_V06
$(CC) $(CFLAGS) -DMOD_LIRC_V06=1 -c mod_lirc.c -o mod_lirc.o
else
$(CC) $(CFLAGS) -I$(MOD_LIRC_DIR)/tools -c mod_lirc.c -o mod_lirc.o
endif
mod_lcdproc.o: mod_lcdproc.c
$(CC) $(CFLAGS) -DMOD_LCDPROC_PRESERVEUPPERRIGHT=$(MOD_LCDPROC_PRESERVEUPPERRIGHT) -c mod_lcdproc.c -o mod_lcdproc.o
mod_netctl.o: mod_netctl.c
$(CC) $(CFLAGS) -c mod_netctl.c -DVERSION=\"$(VERSION)\" -DMOD_NETCTL_MAXCLIENTS=$(MOD_NETCTL_MAXCLIENTS) -o mod_netctl.o
mod_idle.o: mod_idle.c
$(CC) $(CFLAGS) -c mod_idle.c -o mod_idle.o
mod_autoshutdown.o: mod_autoshutdown.c
$(CC) $(CFLAGS) -DMOD_IDLE=0$(MOD_IDLE) -c mod_autoshutdown.c -o mod_autoshutdown.o
mod_cd.o: mod_cd.c
$(CC) $(CFLAGS) -c mod_cd.c -o mod_cd.o
mod_save.o: mod_save.c
$(CC) $(CFLAGS) -c mod_save.c -o mod_save.o
mod_debug.o: mod_debug.c
$(CC) $(CFLAGS) -c mod_debug.c -o mod_debug.o
##########################################################################
# EOF
#
|