1/* 2 * @(#)Imakefile 7.28 04/04/21 3 * 4 * Imakefile for cdinfo 5 * 6 * cdinfo - CD Information Management Library 7 * 8 * Copyright (C) 1993-2004 Ti Kan 9 * E-mail: xmcd@amb.org 10 * 11 * This program is free software; you can redistribute it and/or modify 12 * it under the terms of the GNU General Public License as published by 13 * the Free Software Foundation; either version 2 of the License, or 14 * (at your option) any later version. 15 * 16 * This program is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License 22 * along with this program; if not, write to the Free Software 23 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 24 * 25 */ 26 27 28/* 29 * If your local X configuration is broken, you may need to muck with 30 * the following RANLIB= lines. 31 * On most System V platforms RANLIB should be set to /bin/true. 32 * On BSD-derived systems RANLIB should be set to ranlib. 33 */ 34#if defined(DoRanlibCmd) && (DoRanlibCmd == NO) 35RANLIB= /bin/true 36#endif 37 38 39/**** Optional defines: Change as you see fit. ***************************** 40 * 41 * -DNO_STDLIB_H 42 * The system does not support <stdlib.h> 43 * 44 * -DNO_UNISTD_H 45 * The system does not support <unistd.h> 46 * 47 * -DHAS_ICONV_H (Linux only) 48 * The system has <iconv.h> and the iconv(3) library call. 49 * 50 * -DHAS_NCURSES_H (BSD/OS only) 51 * The system has <ncurses.h> and the ncurses library. 52 * 53 * -D_IRIX6 54 * This is a SGI IRIX 6.x system. 55 * 56 * -D_SCO5 57 * This is a SCO Open Server Release 5 system. 58 * 59 * All other platform-specific feature setup are in common_d/config.h 60 * 61 */ 62#if defined(LinuxArchitecture) 63/* The following conditional is GNU-make specific */ 64ifeq "$(wildcard /usr/include/iconv.h)" "/usr/include/iconv.h" 65DEFINES= -DHAS_ICONV_H 66endif 67#else 68#if defined(BSDOSArchitecture) || defined(__bsdi__) 69.if exists(/usr/include/ncurses.h) 70DEFINES= -DHAS_NCURSES_H 71.endif 72#else 73#if defined(SGIArchitecture) && OSMajorVersion >= 6 74DEFINES= -D_IRIX6 75#else 76#if (defined(SCOArchitecture) || defined(i386ScoArchitecture)) && \ 77 (defined(i386Sco325Architecture) || OSMajorVersion >= 5) 78DEFINES= -D_SCO5 79#else /* all others */ 80DEFINES= 81#endif /* SCO5 */ 82#endif /* IRIX6 */ 83#endif /* BSD/OS */ 84#endif /* Linux */ 85 86 87/* 88 * POSIX threads stuff 89 */ 90#if defined(OsfArchitecture) || defined(OSF1Architecture) 91THREADS_CFLAGS= -pthread 92#endif 93 94#if defined(USLArchitecture) && defined(i386Architecture) 95/* UnixWare 7, Caldera Open UNIX 8 only. UnixWare 2.x, UnixWare 1.x, 96 * SVR4.2/386 and SVR4.0/386 please comment out the following two lines. 97 */ 98THREADS_CFLAGS= -Kpthread 99#endif 100 101#if defined(SunArchitecture) && OSMajorVersion >= 5 102/* Solaris 2.5 and later */ 103THREADS_DEFINES= -D_REENTRANT 104#endif 105 106#if defined(AIXArchitecture) && \ 107 ((OSMajorVersion == 4 && OSMinorVersion >= 1) || OSMajorVersion > 4) 108/* AIX 4.1 and later */ 109THREADS_DEFINES= -D_THREAD_SAFE=1 110#endif 111 112#if defined(HPArchitecture) && OSMajorVersion >= 11 113/* HP-UX 11.0 and later */ 114THREADS_DEFINES= -D_POSIX_C_SOURCE=199506 115#endif 116 117#if defined(LinuxArchitecture) && HasPosixThreads 118/* Linux with glibc 2.1 or later */ 119THREADS_DEFINES= -D_REENTRANT 120#endif 121 122#if defined(FreeBSDArchitecture) && HasPosixThreads 123/* FreeBSD 4.x and later */ 124THREADS_CFLAGS= -pthread 125#endif 126 127 128/* 129 * Add local include path 130 */ 131INCLUDES=-I.. 132 133 134/* 135 * C Source files 136 */ 137SRCS= cdinfo_i.c \ 138 cdinfo_x.c \ 139 hist.c \ 140 motd.c 141 142/* 143 * Objects files 144 */ 145OBJS= cdinfo_i.o \ 146 cdinfo_x.o \ 147 hist.o \ 148 motd.o 149 150/* 151 * Build rule for the CD Information Library 152 */ 153NormalLibraryTarget(cdinfo,$(OBJS)) 154DependTarget() 155 156