"Fossies" - the Fresh Open Source Software Archive

Member "tofrodos/src/makefile.gcc" (27 Oct 2013, 1819 Bytes) of archive /linux/misc/tofrodos-1.7.13.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 # makefile.gcc	Makefile for building with the GNU C compiler on Linux.
    2 # Copyright 1996-2012 by Christopher Heng. All rights reserved.
    3 
    4 # This makefile requires the GNU make to work (we use the GNU extensions).
    5 
    6 # Define the following if you need
    7 #
    8 #	DEBUG	to add debugging information, eg "make DEBUG=1 all"
    9 
   10 
   11 ifdef DEBUG
   12 CDEBUG = -g
   13 LDEBUG = -g
   14 else
   15 CDEBUG = -O2
   16 LDEBUG = -s
   17 endif
   18 
   19 # programs
   20 CC = gcc
   21 CD = cd
   22 CP = cp
   23 GZIP = gzip
   24 INSTALL = install
   25 LN = ln
   26 LD = gcc
   27 MAKE = make
   28 MKDIR = mkdir
   29 MV = mv
   30 RM = rm -f
   31 
   32 # flags
   33 CFLAGS = $(DEFINES) $(TFLAG) $(CDEBUG) -c -Wall
   34 GZIPFLAGS = -9
   35 INSTALLBINFLAGS = -m 755
   36 INSTALLDATAFLAGS = -m 644
   37 LDFLAGS = $(LDEBUG)
   38 LNFLAGS = -sf
   39 RMRECURFLAGS = -rf
   40 
   41 # directories
   42 BINDIR = /usr/bin
   43 LIBDIR = lib
   44 MANDIR = /usr/man/man1
   45 
   46 # filenames
   47 FROMDOS = fromdos
   48 FROMDOSMAN = fromdos.1
   49 FROMDOSTXT = fromdos.txt
   50 TODOS = todos
   51 ZIPSRCNAME = tfd.zip
   52 
   53 # lists of filenames
   54 OBJS =	emsg.o \
   55 	init.o \
   56 	tofrodos.o \
   57 	utility.o
   58 
   59 # implicit rules
   60 .c.o:
   61 	$(CC) $(CFLAGS) $<
   62 
   63 # user visible rules
   64 all: $(FROMDOS) $(TODOS)
   65 
   66 clean:
   67 	$(RM) $(OBJS)
   68 
   69 clobber: clean
   70 	$(RM) $(FROMDOS) $(TODOS)
   71 
   72 install: installman
   73 	$(INSTALL) $(INSTALLBINFLAGS) $(FROMDOS) $(BINDIR)
   74 	($(CD) $(BINDIR) ; $(LN) $(LNFLAGS) fromdos todos)
   75 
   76 installman: $(FROMDOSMAN)
   77 	$(INSTALL) $(INSTALLDATAFLAGS) $(FROMDOSMAN) $(MANDIR)
   78 	($(CD) $(MANDIR) ; $(LN) $(LNFLAGS) fromdos.1 todos.1)
   79 
   80 
   81 # real rules
   82 $(FROMDOS): $(OBJS)
   83 	$(CC) $(LDFLAGS) -o $(FROMDOS) $(OBJS)
   84 
   85 $(FROMDOSTXT): $(FROMDOSMAN)
   86 	gtbl $(FROMDOSMAN) | groff -Tascii -mandoc | \
   87 		troff -Tascii -mandoc | grotty > $@
   88 
   89 $(TODOS): $(FROMDOS)
   90 	$(LN) $(LNFLAGS) $(FROMDOS) $(TODOS)
   91 
   92 # objects
   93 init.o: init.c config.h emsg.h tofrodos.h utility.h version.h
   94 
   95 tofrodos.o: tofrodos.c config.h emsg.h tofrodos.h utility.h version.h
   96 
   97 utility.o: utility.c config.h emsg.h tofrodos.h utility.h