home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
RISC DISC 3
/
RISC_DISC_3.iso
/
resources
/
etexts
/
gems
/
gemsv
/
ch7_6
/
matrix
/
makefile.
next >
Wrap
Makefile
|
1995-01-27
|
1KB
|
50 lines
# An ANSI C compiler: gnu's "gcc"
CC = gcc
# The UNIX flag must be defined for UNIX implementations
#CPPFLAGS = -DUNIX -DX11 -I.
# Very important! The first flag (struct-return) makes it safe to link
# gcc objects with cc objects.
GCCFLAGS = -fpcc-struct-return
# Object files wiil go in this subdirectory
OBJ_DIR = .
# User-defined; to pass options in to the compilation, say things
# like 'make CFLAGS=-g'. Put flags here to make them permanent.
CFLAGS = -O2
#####################################################################
TARGET = libmat.a
HFILES = \
mat3.h
OBJECTS = mat3.o
#####################################################################
PATH_OBJECTS = $(OBJECTS:%=$(OBJ_DIR)/%)
$(OBJ_DIR)/%.o: %.c
$(CC) $(GCCFLAGS) $(CFLAGS) -c -o $(OBJ_DIR)/$*.o $*.c
$(TARGET): $(PATH_OBJECTS)
echo $(PATH_OBJECTS)
ar rv $(TARGET) $(PATH_OBJECTS)
ranlib $(TARGET)
remove:
/bin/rm -f $(PATH_OBJECTS)
/bin/rm -f *~
clean: remove $(TARGET)
$(PATH_OBJECTS): $(HFILES)