home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #6
/
amigamamagazinepolishissue1998.iso
/
coders
/
biblioteki
/
c_library
/
easylibs
/
source
/
dmakefile
next >
Wrap
Makefile
|
1977-12-31
|
3KB
|
115 lines
#
# Makefile for creating a library with LibHeader.c
#
##########################################################################
# Definitions used in LibHeader.c
##########################################################################
LIBNAME=helloworld.library
LIBVERSION=40
LIBREVISION=1
#LIBBASESIZE=sizeof(struct Library)
#LIBINITFUNC=
#LIBOPENFUNC=
#LIBCLOSEFUNC=
#LIBTERMFUNC=
#LIBFUNCTABLE=LibFuncTable
##########################################################################
# Use this to compile with Dice
##########################################################################
CC=dcc
CFLAGS= -DLIBNAME=$(LIBNAME) -DLIBVERSION=$(LIBVERSION) \
-DLIBREVISION=$(LIBREVISION) -Iinclude
AS=dcc
AFLAGS=
LN=dcc
LFLAGS= -l0 -lc -lamiga30
TO=-o
NOLINK=-c
LINK=
##########################################################################
# Use this to compile with SAS/C
##########################################################################
#CC=sc
#CFLAGS=STDIO INCLUDEDIR include DEFINE LIBNAME=$(LIBNAME) \
# DEFINE LIBVERSION=$(LIBVERSION) DEFINE LIBREVISION=$(LIBREVISION)
#AS=
#AFLAGS=
#LN=slink
#LFLAGS= NOICONS FROM
#TO=TO
#NOLINK=
#LINK=LINK
###########################################################################
# You should not need to change anything below
###########################################################################
# Main targets: all clean
all: Xtract fd2pragma HelloWorld libs/HelloWorld.library
clean:
delete quiet #?.o libs/HelloWorld.library HelloWorld Xtract fd2pragma \
include/clib/HelloWorld_protos.h \
include/pragmas/HelloWorld_pragmas.h \
include/fd/HelloWorld_lib.fd
#
# Stuff for creating the library
#
libs/HelloWorld.library: LibHeader.o HelloWorldLib.o
$(LN) $(TO) libs/HelloWorld.library $(LFLAGS) LibHeader.o \
HelloWorldLib.o
LibHeader.o: LibHeader.c LibFuncTable.c
$(CC) $(CFLAGS) $(NOLINK) LibHeader.c
HelloWorldLib.o: HelloWorldLib.c
$(CC) $(CFLAGS) $(NOLINK) HelloWorldLib.c
LibFuncTable.c: include/fd/HelloWorld_lib.fd
fd2pragma include/fd/HelloWorld_lib.fd FUNCTABLE LibFuncTable.c
#
# Stuff for creating the executable
#
HelloWorld: include/clib/HelloWorld_protos.h \
include/pragmas/HelloWorld_pragmas.h \
HelloWorld.c
$(CC) $(LINK) $(CFLAGS) $(TO) HelloWorld HelloWorld.c
#
# Stuff for creating the include files
#
Xtract: Xtract.c
$(CC) $(LINK) $(CFLAGS) $(TO) Xtract Xtract.c
fd2pragma: fd2pragma.c
$(CC) $(LINK) $(CFLAGS) $(TO) fd2pragma fd2pragma.c
include/clib/HelloWorld_protos.h: HelloWorldLib.c
Xtract HelloWorldLib.c PROTOS >include/clib/HelloWorld_protos.h
include/pragmas/HelloWorld_pragmas.h: include/fd/HelloWorld_lib.fd
fd2pragma include/fd/HelloWorld_lib.fd \
SAS include/pragmas/HelloWorld_pragmas.h
include/fd/HelloWorld_lib.fd: HelloWorldLib.c
Xtract HelloWorldLib.c FD >include/fd/HelloWorld_lib.fd