Added a real makefile.
This commit is contained in:
parent
37d178d794
commit
2cc828d8d0
29
libargv/Makefile
Normal file
29
libargv/Makefile
Normal file
@ -0,0 +1,29 @@
|
||||
#
|
||||
# Build the libargv library.
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
|
||||
CC = gcc
|
||||
AR = ar
|
||||
RANLIB = ranlib
|
||||
|
||||
CFLAGS = -Wall -pedantic -O3
|
||||
CPPFLAGS =
|
||||
LDFLAGS =
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .c .o .a
|
||||
|
||||
.c.o:
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
|
||||
|
||||
libargv.a: argv.o
|
||||
$(AR) cr libargv.a argv.o
|
||||
$(RANLIB) libargv.a
|
||||
|
||||
test: test.o libargv.a
|
||||
$(CC) $(LDFLAGS) test.o libargv.a -o test
|
||||
|
||||
realclean distclean clean::
|
||||
rm -f argv.o libargv.o test.o test
|
||||
@ -1,18 +0,0 @@
|
||||
#
|
||||
# Skeleton Makefile -- process with smake to create real Makefile.
|
||||
#
|
||||
# $Header$
|
||||
#
|
||||
.opt -o GNUmakefile.in
|
||||
|
||||
LIBRARY = argv
|
||||
SRCS = argv.c
|
||||
|
||||
.include <library.smk>
|
||||
.include <autoconf.base.smk>
|
||||
|
||||
test: test.o libargv.a
|
||||
$(CC) $(LDFLAGS) -o $@ $^
|
||||
|
||||
clean-local::
|
||||
rm -f test test.o
|
||||
@ -1,46 +0,0 @@
|
||||
dnl
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
dnl
|
||||
dnl NOTE: the beginning comments should be dnl'ed so we get the #!/bin/sh
|
||||
dnl at the very top of the configure script.
|
||||
dnl
|
||||
dnl Copyright 1995 by Gray Watson
|
||||
dnl
|
||||
dnl This file is part of the argv library.
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, and distribute this software for
|
||||
dnl any purpose and without fee is hereby granted, provided that the
|
||||
dnl above copyright notice and this permission notice appear in all
|
||||
dnl copies, and that the name of Gray Watson not be used in advertising
|
||||
dnl or publicity pertaining to distribution of the document or software
|
||||
dnl without specific, written prior permission.
|
||||
dnl
|
||||
dnl Gray Watson makes no representations about the suitability of the
|
||||
dnl software described herein for any purpose. It is provided "as is"
|
||||
dnl without express or implied warranty.
|
||||
dnl
|
||||
dnl The author may be contacted at gray.watson@letters.com
|
||||
dnl
|
||||
dnl $Id$
|
||||
dnl
|
||||
AC_REVISION($Revision$)dnl
|
||||
AC_INIT(argv.c)
|
||||
|
||||
dnl Checks for paths and programs.
|
||||
dnl
|
||||
AC_PROG_CC
|
||||
AC_PROG_RANLIB
|
||||
|
||||
dnl Enable warning flags for gcc.
|
||||
dnl
|
||||
if test "$GCC" = yes; then
|
||||
CFLAGS="$CFLAGS -Wall -pedantic -ansi"
|
||||
fi
|
||||
|
||||
dnl Remove '-g' and '-O2' from the compile flags.
|
||||
dnl
|
||||
CFLAGS=`echo $CFLAGS | sed -e "s/-g//" -e "s/-O2//"`
|
||||
|
||||
dnl Write results.
|
||||
dnl
|
||||
AC_OUTPUT(GNUmakefile)
|
||||
Loading…
Reference in New Issue
Block a user