########################################################################### # Copyright (c) 1991 - 1993 Heinz W. Werntges. All rights reserved. # Distributed by Free Software Foundation, Inc. # # This file is part of HP2xx. # # HP2xx is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY. No author or distributor accepts responsibility # to anyone for the consequences of using it or for whether it serves any # particular purpose or works at all, unless he says so in writing. Refer # to the GNU General Public License, Version 2 or later, for full details # # Everyone is granted permission to copy, modify and redistribute # HP2xx, but only under the conditions described in the GNU General Public # License. A copy of this license is supposed to have been # given to you along with HP2xx so you can know your rights and # responsibilities. It should be in a file named COPYING. Among other # things, the copyright notice and this notice must be preserved on all # copies. ########################################################################### # # Generic Makefile for my local Sparc (Sun-OS 4.1.2) version of hp2xx # # CC and OPTIONS set for gcc, but any ANSI-C compiler should work. # For a non-gcc compiler, simply set OPTIONS = -O (to start with) CC = gcc OPTIONS = -O2 -ansi -fstrength-reduce -Wall # -finline-functions LFLAGS = -L$(OPENWINHOME)/lib # link flags INCDIR = -I$(OPENWINHOME)/include # additional dir with include files LIBS = -lsunwindow -lsuntool -lpixrect -lm # libraries to be linked XLIB = -lX # X11 library # There are three versions available which you select by un-commenting # three lines and commenting out the other three-lines groups just below # this text. Remember to un-comment ONLY ONE version! # Standard version: CFLAGS = -c -DUNIX $(INCDIR) $(OPTIONS) # compile flags EX_SRC = # extra sources EX_OBJ = # extra objects # Standard version + Sunview previewer: # CFLAGS = -c -DUNIX -DSUNVIEW $(INCDIR) $(OPTIONS) # EX_SRC = to_sunvw.c # EX_OBJ = to_sunvw.o # Extended version + Sunview previewer, including modes PIC and PAC: # Note: You'll need files to_pic.c and to_pac.c from ../extras # CFLAGS = -c -DUNIX -DSUNVIEW -DPIC_PAC $(INCDIR) $(OPTIONS) # EX_SRC = to_sunvw.c to_pic.c to_pac.c # EX_OBJ = to_sunvw.o to_pic.o to_pac.o # No user-serviceable part below! ############################################################################# COMMON_INCS = hp2xx.h bresnham.h ALL_INCS = $(COMMON_INCS) chardraw.h charset.h getopt.h x11.h ilbm.h iff.h # $(SRCS) NOT USED YET: SRCS = hp2xx.c hpgl.c picbuf.c bresnham.c chardraw.c getopt.c getopt1.c \ $(ALL_INCS)\ to_mf.c to_pcx.c to_pcl.c to_eps.c to_img.c to_pbm.c to_x11.c \ $(EX_SRC) OBJS = hp2xx.o hpgl.o picbuf.o bresnham.o chardraw.o getopt.o getopt1.o \ to_mf.o to_pcx.o to_pcl.o to_eps.o to_img.o to_pbm.o to_x11.o \ $(EX_OBJ) PROGRAM = hp2xx ######################################################################### # # # Implicit Rules # # # ######################################################################### all: $(OBJS) $(CC) $(LFLAGS) $(OBJS) $(XLIB) $(LIBS) -o $(PROGRAM) .c.o: $< $(COMMON_INCS) -rm -f $@ $(CC) $(CFLAGS) $< ######################################################################### # # # Explicit Rules # # # ######################################################################### # We once observed that gcc failed here due to obsolete Sunview headers # If this occurs, try to install gcc with "make install fixincludes". # If thsi does not help and Sun's acc is available, try the following. # This worked at our site! # to_sunvw.o: to_sunvw.c $(COMMON_INCS) # /usr/lang/acc -c -O to_sunvw.c bresnham.o: $< bresnham.h chardraw.o: $< $(COMMON_INCS) chardraw.h charset.h getopt.o: $< getopt.h getopt1.o: $< getopt.h hp2xx.o: $< $(COMMON_INCS) getopt.h hpgl.o: $< $(COMMON_INCS) chardraw.h ilbm.o: $< $(COMMON_INCS) ilbm.h iff.h to_x11.o: $< $(COMMON_INCS) x11.h ######################################################################### clean: rm -f *.o core a.out veryclean: make clean rm -i $(PROGRAM) *% # Our local rule for installation of binary and manual page: install: hp2xx ../doc/hp2xx.1 strip hp2xx install -m 755 hp2xx /usr/local/bin install -m 644 hp2xx.1 /usr/man/local/man1