1
# -*-Makefile-*- for avcall
3
#### Start of system configuration section. ####
5
HOST = i386-pc-win32-gcc
8
# Directories used by "make":
11
# Directories used by "make install":
13
local_prefix = /usr/local
14
exec_prefix = $(prefix)
15
libdir = $(exec_prefix)/lib
16
includedir = $(prefix)/include
17
mandir = $(prefix)/man
19
# Programs used by "make":
23
INCLUDES = -I. -I$(srcdir)
24
ASPFLAGS = -DASM_UNDERSCORE
31
# Programs used by "make install":
33
INSTALL_PROGRAM = @INSTALL_PROGRAM@
34
INSTALL_DATA = @INSTALL_DATA@
36
#### End of system configuration section. ####
40
OBJECTS = avcall.o structcpy.o
42
all : $(OBJECTS) libavcall.a avcall.h $(srcdir)/avcall.3 $(srcdir)/avcall.html
44
avcall.h : avcall.h.mingw32
46
$(LN) avcall.h.mingw32 avcall.h
48
avcall.o : avcall-$(CPU).o
50
$(LN) avcall-$(CPU).o avcall.o
52
avcall-i386.o : avcall-i386.asm
53
$(CC) -c -x assembler avcall-i386.asm
55
avcall-i386.asm : $(srcdir)/avcall-i386-macro.S
56
$(CPP) $(ASPFLAGS) $(srcdir)/avcall-i386-macro.S | grep -v '^ *#line' | grep -v '^#ident' | grep -v '^#' | sed -e 's,% ,%,g' -e 's,\. ,.,g' > avcall-i386.asm
58
structcpy.o : $(srcdir)/structcpy.c
59
$(CC) $(CFLAGS) -c $(srcdir)/structcpy.c
61
libavcall.a : $(OBJECTS)
63
$(AR) $(AR_FLAGS) libavcall.a $(OBJECTS)
65
minitests.o : $(srcdir)/minitests.c avcall.h
66
$(CC) $(CFLAGS) $(INCLUDES) -c $(srcdir)/minitests.c
68
minitests.s : $(srcdir)/minitests.c avcall.h
69
$(CC) $(CFLAGS) $(INCLUDES) -S $(srcdir)/minitests.c
71
minitests.exe : minitests.o $(OBJECTS)
72
$(CC) $(CFLAGS) minitests.o $(OBJECTS) -o minitests.exe
74
check : all minitests.exe
75
minitests.exe > minitests.out
76
LC_ALL=C uniq -u < minitests.out > minitests.output.$(HOST)
77
# You have to check by hand that minitests.output.$(HOST) is empty.
79
tests.o : $(srcdir)/tests.c avcall.h
80
$(CC) $(CFLAGS) $(INCLUDES) -c $(srcdir)/tests.c
82
tests.s : $(srcdir)/tests.c avcall.h
83
$(CC) $(CFLAGS) $(INCLUDES) -S $(srcdir)/tests.c
85
tests.exe : tests.o $(OBJECTS)
86
$(CC) $(CFLAGS) tests.o $(OBJECTS) -o tests.exe
88
extracheck : all tests.exe
90
LC_ALL=C uniq -u < tests.out > tests.output.$(HOST)
91
# You have to check by hand that tests.output.$(HOST) is empty.
98
$(RM) minitests.o minitests.s minitests.exe minitests.out
99
$(RM) tests.o tests.s tests.exe tests.out
102
$(RM) config.status config.log config.cache Makefile avcall.h tests.output.*
104
maintainer-clean : distclean