summaryrefslogtreecommitdiff
path: root/xc/programs/rgb/Imakefile
blob: 1d47b9ea05f4ecbf090c335b7bc912d4ac3e38e9 (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
XCOMM $XConsortium: Imakefile,v 1.30 94/05/14 16:36:45 rws Exp kaleb $

#if UseRgbTxt
   RGB_DEFINES = -DUSE_RGB_TXT
#else
      RGB_PROG = rgb
#endif
        RGB_DB = DefaultRGBDatabase
   SITE_RGB_DB = -DRGB_DB=\"$(RGB_DB)\"
      DEPLIBS = 
      DEFINES = NdbmDefines $(SITE_RGB_DB) $(RGB_DEFINES)
     INCLUDES = -I$(SERVERSRC)/include
#if !UseRgbTxt
        SRCS1 = rgb.c
        OBJS1 = rgb.o
#endif
        SRCS2 = showrgb.c
        OBJS2 = showrgb.o
         SRCS = $(SRCS1) $(SRCS2)
         OBJS = $(OBJS1) $(OBJS2)
     PROGRAMS = $(RGB_PROG) showrgb
#if !UseRgbTxt
#ifdef BSD386Architecture
    DATAFILES = rgb.db
      DATADEP = rgb.db
#else
    DATAFILES = rgb.pag rgb.dir
      DATADEP = rgb.dir		/* just want one run of rgb */
#if !(defined(SGIArchitecture) || defined(SVR4Architecture))
       DBMLIB = -ldbm
#endif
#endif
#if defined(SparcArchitecture) && HasGcc && !HasGcc2
           CC = cc
    CCOPTIONS = /**/
    EXTRA_LOAD_FLAGS = /**/
#endif
#if defined(i386Architecture) && defined(SVR4Architecture)
       DBMLIB = -ldbm -lucb
#endif
#endif /*!UseRgbTxt */

all:: $(PROGRAMS) $(DATADEP)

#if !UseRgbTxt
SingleProgramTarget(rgb,$(OBJS1),NullParameter,$(DBMLIB))
SpecialCObjectRule(rgb,$(ICONFIGFILES),$(_NOOP_))
#endif
SingleProgramTarget(showrgb,$(OBJS2),NullParameter,$(DBMLIB))
SpecialCObjectRule(showrgb,$(ICONFIGFILES),$(_NOOP_))
InstallMultiple($(DATAFILES) rgb.txt,$(LIBDIR))
InstallProgramWithFlags(showrgb,$(BINDIR),NullParameter)
InstallManPage(showrgb,$(MANDIR))

#if !UseRgbTxt
$(DATADEP):  rgb rgb.txt
	RemoveFile($(DATAFILES))
	./rgb rgb < rgb.txt

clean::
	RemoveFile($(DATAFILES))
#endif

DependTarget()