Home | History | Annotate | Download | only in plot
      1 #
      2 # CDDL HEADER START
      3 #
      4 # The contents of this file are subject to the terms of the
      5 # Common Development and Distribution License (the "License").
      6 # You may not use this file except in compliance with the License.
      7 #
      8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
      9 # or http://www.opensolaris.org/os/licensing.
     10 # See the License for the specific language governing permissions
     11 # and limitations under the License.
     12 #
     13 # When distributing Covered Code, include this CDDL HEADER in each
     14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
     15 # If applicable, add the following below this CDDL HEADER, with the
     16 # fields enclosed by brackets "[]" replaced with your own identifying
     17 # information: Portions Copyright [yyyy] [name of copyright owner]
     18 #
     19 # CDDL HEADER END
     20 #
     21 #
     22 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
     23 # Use is subject to license terms.
     24 #
     25 # ident	"%Z%%M%	%I%	%E% SMI"
     26 #
     27 
     28 PROG=	tek t4013 t300 t300s t450 aedplot bgplot dumbplot gigiplot \
     29 	hpplot hp7221plot implot atoplot plottoa vplot crtplot plot
     30 
     31 SUBDIRS= libplot
     32 
     33 DRVOBJ=		driver.o
     34 VPLOTOBJ=	vplot.o chrtab.o
     35 CRTOBJ= 	crtplot.o crtdriver.o
     36 ATOOBJ=		atoplot.o
     37 TOAOBJ=		plottoa.o
     38 
     39 OBJS=  $(DRVOBJ) $(VPLOTOBJ) $(CRTOBJ) $(ATOOBJ) $(TOAOBJ)
     40 
     41 DRVSRC= $(DRVOBJ:%.o=%.c)
     42 VPLOTSRC= $(VPLOTOBJ:%.o=%.c)
     43 CRTSRC=  $(CRTOBJ:%.o=%.c)
     44 ATOSRC=  $(ATOOBJ:%.o=%.c)
     45 TOASRC=  $(TOAOBJ:%.o=%.c)
     46 
     47 SRCS=  $(DRVSRC) $(VPLOTSRC) $(CRTSRC) $(ATOSRC) $(TOASRC)
     48 
     49 include ../Makefile.ucbcmd
     50 
     51 FILEMODE=	755
     52 
     53 INC1 = $(ROOT)/usr/ucbinclude
     54 
     55 LDFLAGS +=  -L$(ROOT)/usr/ucblib -R /usr/ucblib
     56 
     57 LIBPLOT = ./libplot
     58 
     59 LIBS.DEF = -lucb
     60 LIBS.PLOT =
     61 LDLIBS += $(LIBS.PLOT) $(LIBS.DEF)
     62 
     63 CPPFLAGS = -I$(INC1) $(CPPFLAGS.master)
     64 
     65 clean:=		TARGET= clean
     66 clobber:=	TARGET= clobber
     67 
     68 .KEEP_STATE:
     69 
     70 all: $(PROG) debug
     71 
     72 tek:= LDFLAGS += -L$(LIBPLOT)
     73 tek:= LIBS.PLOT = -lm -lt4014
     74 tek:	$(DRVOBJ) $(LIBPLOT)/libt4014.a
     75 	$(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS)
     76 	$(POST_PROCESS)
     77 
     78 t4013:= LDFLAGS += -L$(LIBPLOT)
     79 t4013:= LIBS.PLOT = -lm -lt4013
     80 t4013:	$(DRVOBJ) $(LIBPLOT)/libt4013.a
     81 	$(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS)
     82 	$(POST_PROCESS)
     83 
     84 t300:= LDFLAGS += -L$(LIBPLOT)
     85 t300:= LIBS.PLOT = -lm -lt300
     86 t300:	$(DRVOBJ) $(LIBPLOT)/libt300.a
     87 	$(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS)
     88 	$(POST_PROCESS)
     89 
     90 t300s:= LDFLAGS += -L$(LIBPLOT)
     91 t300s:= LIBS.PLOT = -lm -lt300s
     92 t300s:	$(DRVOBJ) $(LIBPLOT)/libt300s.a
     93 	$(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS)
     94 	$(POST_PROCESS)
     95 
     96 t450:= LDFLAGS += -L$(LIBPLOT)
     97 t450:= LIBS.PLOT = -lm -lt450
     98 t450:	$(DRVOBJ) $(LIBPLOT)/libt450.a
     99 	$(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS)
    100 	$(POST_PROCESS)
    101 
    102 vplot:	$(VPLOTOBJ)
    103 	$(LINK.c) $(VPLOTOBJ) -o $@ $(LDLIBS)
    104 	$(POST_PROCESS)
    105 
    106 crtplot:= LDFLAGS += -L$(LIBPLOT)
    107 crtplot:= LIBS.DEF = -lcurses -ltermcap -lm -lucb
    108 crtplot:  $(CRTOBJ)
    109 	$(LINK.c) $(CRTOBJ) -o $@ $(LDLIBS)
    110 	$(POST_PROCESS)
    111 
    112 aedplot:= LDFLAGS += -L$(LIBPLOT)
    113 aedplot:= LIBS.PLOT = -laed
    114 aedplot:	$(DRVOBJ) $(LIBPLOT)/libaed.a
    115 	$(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS)
    116 	$(POST_PROCESS)
    117 
    118 bgplot:= LDFLAGS += -L$(LIBPLOT)
    119 bgplot:= LIBS.PLOT = -lm -lplotbg
    120 bgplot:	$(DRVOBJ) $(LIBPLOT)/libplotbg.a
    121 	$(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS)
    122 	$(POST_PROCESS)
    123 
    124 dumbplot:= LDFLAGS += -L$(LIBPLOT)
    125 dumbplot:= LIBS.DEF = -ltermcap -lm -lucb
    126 dumbplot:= LIBS.PLOT = -lm -ldumb
    127 dumbplot:	$(DRVOBJ) $(LIBPLOT)/libdumb.a
    128 	$(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS)
    129 	$(POST_PROCESS)
    130 
    131 gigiplot:= LDFLAGS += -L$(LIBPLOT)
    132 gigiplot:= LIBS.PLOT = -lm -lgigi
    133 gigiplot:	$(DRVOBJ) $(LIBPLOT)/libgigi.a
    134 	$(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS)
    135 	$(POST_PROCESS)
    136 
    137 hpplot:= LDFLAGS += -L$(LIBPLOT)
    138 hpplot:= LIBS.PLOT = -lm -lhp2648
    139 hpplot:	$(DRVOBJ) $(LIBPLOT)/libhp2648.a
    140 	$(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS)
    141 	$(POST_PROCESS)
    142 
    143 hp7221plot:= LDFLAGS += -L$(LIBPLOT)
    144 hp7221plot:= LIBS.PLOT = -lm -lhp7221
    145 hp7221plot:	$(DRVOBJ) $(LIBPLOT)/libhp7221.a
    146 	$(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS)
    147 	$(POST_PROCESS)
    148 
    149 implot:= LDFLAGS += -L$(LIBPLOT)
    150 implot:= LIBS.PLOT = -lm -limagen
    151 implot:	$(DRVOBJ) $(LIBPLOT)/libimagen.a
    152 	$(LINK.c) $(DRVOBJ) -o $@ $(LDLIBS)
    153 	$(POST_PROCESS)
    154 
    155 atoplot:= LDFLAGS += -L$(LIBPLOT)
    156 atoplot:= LIBS.PLOT = -lplot
    157 atoplot:  $(ATOOBJ) $(LIBPLOT)/libplot.a
    158 	$(LINK.c) $(ATOOBJ) -o $@ $(LDLIBS)
    159 	$(POST_PROCESS)
    160 
    161 plottoa:  $(TOAOBJ)
    162 	$(LINK.c) $(TOAOBJ) -o $@ $(LDLIBS)
    163 	$(POST_PROCESS)
    164 
    165 $(LIBPLOT)/libt300.a:	FRC
    166 	cd $(LIBPLOT); pwd; $(MAKE) t300
    167 
    168 $(LIBPLOT)/libt300s.a: 	FRC
    169 	cd $(LIBPLOT); pwd; $(MAKE) t300s
    170 
    171 $(LIBPLOT)/libt450.a: 	FRC
    172 	cd $(LIBPLOT); pwd; $(MAKE) t450
    173 
    174 $(LIBPLOT)/libt4014.a: 	FRC
    175 	cd $(LIBPLOT); pwd; $(MAKE) t4014
    176 
    177 $(LIBPLOT)/libaed.a:	FRC
    178 	cd $(LIBPLOT); pwd; $(MAKE) aed
    179 
    180 $(LIBPLOT)/libplotbg.a:	FRC
    181 	cd $(LIBPLOT); pwd; $(MAKE) bitgraph
    182 
    183 $(LIBPLOT)/libdumb.a:	FRC
    184 	cd $(LIBPLOT); pwd; $(MAKE) dumb
    185 
    186 $(LIBPLOT)/libgigi.a:	FRC
    187 	cd $(LIBPLOT); pwd; $(MAKE) gigi
    188 
    189 $(LIBPLOT)/libhp2648.a:	FRC
    190 	cd $(LIBPLOT); pwd; $(MAKE) hp2648
    191 
    192 $(LIBPLOT)/libhp7221.a:	FRC
    193 	cd $(LIBPLOT); pwd; $(MAKE) hp7221
    194 
    195 $(LIBPLOT)/libimagen.a:	FRC
    196 	cd $(LIBPLOT); pwd; $(MAKE) imagen
    197 
    198 $(LIBPLOT)/libplot.a:	FRC
    199 	cd $(LIBPLOT); pwd; $(MAKE) plot
    200 
    201 $(LIBPLOT)/libt4013.a:	FRC
    202 	cd $(LIBPLOT); pwd; $(MAKE) t4013
    203 
    204 install: all $(ROOTPROG)
    205 
    206 clean:  $(SUBDIRS) clean_all
    207 
    208 clobber:  $(SUBDIRS) clobber_all
    209 
    210 clean_all:
    211 	$(RM) $(OBJS)
    212 
    213 clobber_all:
    214 	$(RM) $(PROG)
    215 
    216 $(SUBDIRS):  FRC
    217 	@cd $@; pwd; $(MAKE) $(MFLAGS) $(TARGET)
    218 
    219 lint:	lint_PROG
    220 
    221 include ../Makefile.ucbtarg
    222 
    223 FRC:
    224 
    225