1/* 2 * @(#)Imakefile 1.30 04/03/25 3 * 4 * Imakefile for libcddb and libcddbkey 5 * 6 * libcddb, libcddbkey - CDDB interface library for xmcd/cda 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 * -DSOCKS 60 * Define this if your network requires that clients such as 61 * xmcd/cda to be SOCKSified in order to access an Internet server. 62 * You will also have to change to link the application with the 63 * socks library instead of the standard socket library. 64 * 65 * -DNOREMOTE 66 * Define this if you don't have TCP/IP and socket support. 67 * This causes libcddb to become a local-only datastore manager. 68 * Submits to CDDB merely writes to the local cache. CDDB queries 69 * and reads are done only from this cache, and the cache will not 70 * expire. 71 * 72 * All other platform-specific feature setup are in common_d/config.h 73 * 74 */ 75#if defined(LinuxArchitecture) 76/* The following conditional is GNU-make specific */ 77ifeq "$(wildcard /usr/include/iconv.h)" "/usr/include/iconv.h" 78DEFINES= -DHAS_ICONV_H 79endif 80#else 81#if defined(BSDOSArchitecture) || defined(__bsdi__) 82.if exists(/usr/include/ncurses.h) 83DEFINES= -DHAS_NCURSES_H 84.endif 85#else 86#if defined(SGIArchitecture) && OSMajorVersion >= 6 87DEFINES= -D_IRIX6 88#else 89#if (defined(SCOArchitecture) || defined(i386ScoArchitecture)) && \ 90 (defined(i386Sco325Architecture) || OSMajorVersion >= 5) 91DEFINES= -D_SCO5 92#else /* all others */ 93DEFINES= 94#endif /* SCO5 */ 95#endif /* IRIX6 */ 96#endif /* BSD/OS */ 97#endif /* Linux */ 98 99 100/* 101 * POSIX threads stuff 102 */ 103#if defined(OsfArchitecture) || defined(OSF1Architecture) 104THREADS_CFLAGS= -pthread 105#endif 106 107#if defined(USLArchitecture) && defined(i386Architecture) 108/* UnixWare 7, Caldera Open UNIX 8 only. UnixWare 2.x, UnixWare 1.x, 109 * SVR4.2/386 and SVR4.0/386 please comment out the following two lines. 110 */ 111THREADS_CFLAGS= -Kpthread 112#endif 113 114#if defined(SunArchitecture) && OSMajorVersion >= 5 115/* Solaris 2.5 and later */ 116THREADS_DEFINES= -D_REENTRANT 117#endif 118 119#if defined(AIXArchitecture) && \ 120 ((OSMajorVersion == 4 && OSMinorVersion >= 1) || OSMajorVersion > 4) 121/* AIX 4.1 and later */ 122THREADS_DEFINES= -D_THREAD_SAFE=1 123#endif 124 125#if defined(HPArchitecture) && OSMajorVersion >= 11 126/* HP-UX 11.0 and later */ 127THREADS_DEFINES= -D_POSIX_C_SOURCE=199506 128#endif 129 130#if defined(LinuxArchitecture) && HasPosixThreads 131/* Linux with glibc 2.1 or later */ 132THREADS_DEFINES= -D_REENTRANT 133#endif 134 135#if defined(FreeBSDArchitecture) && HasPosixThreads 136/* FreeBSD 4.x and later */ 137THREADS_CFLAGS= -pthread 138#endif 139 140 141/* 142 * QNX specific stuff 143 */ 144#if defined(__QNX__) 145LIBCDDBKEY= cddbkey3r.lib 146LIBCDDBKEY1= cddbkey13r.lib 147LIBCDDBKEY2= cddbkey23r.lib 148#else 149LIBCDDBKEY= libcddbkey.a 150LIBCDDBKEY1= libcddbkey1.a 151LIBCDDBKEY2= libcddbkey2.a 152#endif 153 154 155/* 156 * Add local include path 157 */ 158INCLUDES=-I.. 159 160 161/* 162 * C Source files 163 */ 164SRCS= control.c \ 165 credit.c \ 166 disc.c \ 167 discs.c \ 168 fcddb.c \ 169 fullname.c \ 170 gen.c \ 171 genre.c \ 172 genrelist.c \ 173 genretree.c \ 174 options.c \ 175 region.c \ 176 regionlist.c \ 177 language.c \ 178 langlist.c \ 179 role.c \ 180 rolelist.c \ 181 roletree.c \ 182 segment.c \ 183 track.c \ 184 url.c \ 185 urllist.c \ 186 urlmanager.c \ 187 userinfo.c \ 188 cddbkey1.c 189 190 191/* 192 * Objects files for libcddb 193 */ 194OBJS= control.o \ 195 credit.o \ 196 disc.o \ 197 discs.o \ 198 fcddb.o \ 199 fullname.o \ 200 gen.o \ 201 genre.o \ 202 genrelist.o \ 203 genretree.o \ 204 options.o \ 205 region.o \ 206 regionlist.o \ 207 language.o \ 208 langlist.o \ 209 role.o \ 210 rolelist.o \ 211 roletree.o \ 212 segment.o \ 213 track.o \ 214 url.o \ 215 urllist.o \ 216 urlmanager.o \ 217 userinfo.o 218 219/* 220 * Objects file for libcddbkey1 221 */ 222KOBJ= cddbkey1.o 223 224 225/* 226 * Build rule for the CD Information Library 227 */ 228NormalLibraryTarget(cddblocal,$(OBJS)) 229NormalLibraryTarget(cddbkey1,$(KOBJ)) 230DependTarget() 231 232$(LIBCDDBKEY2): cddbkey2.o 233 $(RM) $@ 234 $(AR) $@ cddbkey2.o 235 $(RANLIB) $@ 236 237all:: 238 @$(RM) $(LIBCDDBKEY) 239 @if [ -f $(LIBCDDBKEY2) ]; \ 240 then $(LN) $(LIBCDDBKEY2) $(LIBCDDBKEY); \ 241 else $(LN) $(LIBCDDBKEY1) $(LIBCDDBKEY); \ 242 fi 243 244