Artifact
0783e839a03c3e4a76db1515bb899e269f0b110a:
0000: 23 20 2d 2a 2d 20 4d 61 6b 65 66 69 6c 65 20 2d # -*- Makefile -
0010: 2a 2d 20 66 6f 72 20 61 76 63 61 6c 6c 0a 0a 23 *- for avcall..#
0020: 23 23 23 20 53 74 61 72 74 20 6f 66 20 73 79 73 ### Start of sys
0030: 74 65 6d 20 63 6f 6e 66 69 67 75 72 61 74 69 6f tem configuratio
0040: 6e 20 73 65 63 74 69 6f 6e 2e 20 23 23 23 23 0a n section. ####.
0050: 0a 23 20 46 6c 61 67 73 20 74 68 61 74 20 63 61 .# Flags that ca
0060: 6e 20 62 65 20 73 65 74 20 6f 6e 20 74 68 65 20 n be set on the
0070: 6e 6d 61 6b 65 20 63 6f 6d 6d 61 6e 64 20 6c 69 nmake command li
0080: 6e 65 3a 0a 23 20 20 20 4d 46 4c 41 47 53 3d 7b ne:.# MFLAGS={
0090: 2d 4d 4c 7c 2d 4d 54 7c 2d 4d 44 7d 20 66 6f 72 -ML|-MT|-MD} for
00a0: 20 64 65 66 69 6e 69 6e 67 20 74 68 65 20 63 6f defining the co
00b0: 6d 70 69 6c 61 74 69 6f 6e 20 6d 6f 64 65 6c 0a mpilation model.
00c0: 23 20 20 20 20 20 4d 46 4c 41 47 53 3d 2d 4d 4c # MFLAGS=-ML
00d0: 20 28 74 68 65 20 64 65 66 61 75 6c 74 29 20 20 (the default)
00e0: 53 69 6e 67 6c 65 2d 74 68 72 65 61 64 65 64 2c Single-threaded,
00f0: 20 73 74 61 74 69 63 61 6c 6c 79 20 6c 69 6e 6b statically link
0100: 65 64 20 2d 20 6c 69 62 63 2e 6c 69 62 0a 23 20 ed - libc.lib.#
0110: 20 20 20 20 4d 46 4c 41 47 53 3d 2d 4d 54 20 20 MFLAGS=-MT
0120: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 75 Mu
0130: 6c 74 69 2d 74 68 72 65 61 64 65 64 2c 20 73 74 lti-threaded, st
0140: 61 74 69 63 61 6c 6c 79 20 6c 69 6e 6b 65 64 20 atically linked
0150: 20 2d 20 6c 69 62 63 6d 74 2e 6c 69 62 0a 23 20 - libcmt.lib.#
0160: 20 20 20 20 4d 46 4c 41 47 53 3d 2d 4d 44 20 20 MFLAGS=-MD
0170: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 4d 75 Mu
0180: 6c 74 69 2d 74 68 72 65 61 64 65 64 2c 20 64 79 lti-threaded, dy
0190: 6e 61 6d 69 63 61 6c 6c 79 20 6c 69 6e 6b 65 64 namically linked
01a0: 20 2d 20 6d 73 76 63 72 74 2e 6c 69 62 0a 23 20 - msvcrt.lib.#
01b0: 20 20 44 45 42 55 47 3d 31 20 20 20 66 6f 72 20 DEBUG=1 for
01c0: 63 6f 6d 70 69 6c 69 6e 67 20 77 69 74 68 20 64 compiling with d
01d0: 65 62 75 67 67 69 6e 67 20 69 6e 66 6f 72 6d 61 ebugging informa
01e0: 74 69 6f 6e 0a 23 20 4e 6f 74 65 20 74 68 61 74 tion.# Note that
01f0: 20 6e 6d 61 6b 65 20 63 6f 6d 6d 61 6e 64 20 6c nmake command l
0200: 69 6e 65 20 66 6c 61 67 73 20 61 72 65 20 61 75 ine flags are au
0210: 74 6f 6d 61 74 69 63 61 6c 6c 79 20 70 61 73 73 tomatically pass
0220: 65 64 20 74 6f 20 73 75 62 64 69 72 65 63 74 6f ed to subdirecto
0230: 72 79 0a 23 20 4d 61 6b 65 66 69 6c 65 73 2e 20 ry.# Makefiles.
0240: 54 68 65 72 65 66 6f 72 65 20 77 65 20 64 6f 6e Therefore we don
0250: 27 74 20 6e 65 65 64 20 74 6f 20 70 61 73 73 20 't need to pass
0260: 74 68 65 6d 20 65 78 70 6c 69 63 69 74 6c 79 20 them explicitly
0270: 74 6f 20 73 75 62 64 69 72 65 63 74 6f 72 79 0a to subdirectory.
0280: 23 20 4d 61 6b 65 66 69 6c 65 73 2c 20 62 75 74 # Makefiles, but
0290: 20 74 68 65 20 73 75 62 64 69 72 65 63 74 6f 72 the subdirector
02a0: 79 20 4d 61 6b 65 66 69 6c 65 73 20 6e 65 65 64 y Makefiles need
02b0: 20 74 6f 20 68 61 76 65 20 74 68 65 20 73 61 6d to have the sam
02c0: 65 20 64 65 66 61 75 6c 74 73 2e 0a 23 20 42 75 e defaults..# Bu
02d0: 69 6c 64 69 6e 67 20 61 73 20 61 20 44 4c 4c 20 ilding as a DLL
02e0: 6e 6f 74 20 73 75 70 70 6f 72 74 65 64 20 79 65 not supported ye
02f0: 74 2e 0a 44 4c 4c 3d 30 0a 21 69 66 20 21 64 65 t..DLL=0.!if !de
0300: 66 69 6e 65 64 28 44 45 42 55 47 29 0a 44 45 42 fined(DEBUG).DEB
0310: 55 47 3d 30 0a 21 65 6e 64 69 66 0a 21 69 66 20 UG=0.!endif.!if
0320: 21 64 65 66 69 6e 65 64 28 4d 46 4c 41 47 53 29 !defined(MFLAGS)
0330: 0a 21 69 66 20 21 24 28 44 4c 4c 29 0a 4d 46 4c .!if !$(DLL).MFL
0340: 41 47 53 3d 0a 21 65 6c 73 65 0a 4d 46 4c 41 47 AGS=.!else.MFLAG
0350: 53 3d 2d 4d 44 0a 21 65 6e 64 69 66 0a 21 65 6e S=-MD.!endif.!en
0360: 64 69 66 0a 0a 21 69 66 20 24 28 44 45 42 55 47 dif..!if $(DEBUG
0370: 29 0a 4f 50 54 49 4d 46 4c 41 47 53 20 3d 20 2d ).OPTIMFLAGS = -
0380: 4f 64 20 2d 5a 37 0a 21 65 6c 73 65 0a 4f 50 54 Od -Z7.!else.OPT
0390: 49 4d 46 4c 41 47 53 20 3d 20 2d 44 5f 4e 44 45 IMFLAGS = -D_NDE
03a0: 42 55 47 20 2d 4f 31 0a 21 65 6e 64 69 66 0a 0a BUG -O1.!endif..
03b0: 48 4f 53 54 20 3d 20 69 33 38 36 2d 70 63 2d 77 HOST = i386-pc-w
03c0: 69 6e 33 32 2d 6d 73 76 63 0a 43 50 55 20 3d 20 in32-msvc.CPU =
03d0: 69 33 38 36 0a 0a 23 20 44 69 72 65 63 74 6f 72 i386..# Director
03e0: 69 65 73 20 75 73 65 64 20 62 79 20 22 6d 61 6b ies used by "mak
03f0: 65 22 3a 0a 73 72 63 64 69 72 20 3d 20 2e 0a 0a e":.srcdir = ...
0400: 23 20 44 69 72 65 63 74 6f 72 69 65 73 20 75 73 # Directories us
0410: 65 64 20 62 79 20 22 6d 61 6b 65 20 69 6e 73 74 ed by "make inst
0420: 61 6c 6c 22 3a 0a 70 72 65 66 69 78 20 3d 20 2f all":.prefix = /
0430: 75 73 72 2f 6c 6f 63 61 6c 0a 6c 6f 63 61 6c 5f usr/local.local_
0440: 70 72 65 66 69 78 20 3d 20 2f 75 73 72 2f 6c 6f prefix = /usr/lo
0450: 63 61 6c 0a 65 78 65 63 5f 70 72 65 66 69 78 20 cal.exec_prefix
0460: 3d 20 24 28 70 72 65 66 69 78 29 0a 6c 69 62 64 = $(prefix).libd
0470: 69 72 20 3d 20 24 28 65 78 65 63 5f 70 72 65 66 ir = $(exec_pref
0480: 69 78 29 2f 6c 69 62 0a 69 6e 63 6c 75 64 65 64 ix)/lib.included
0490: 69 72 20 3d 20 24 28 70 72 65 66 69 78 29 2f 69 ir = $(prefix)/i
04a0: 6e 63 6c 75 64 65 0a 6d 61 6e 64 69 72 20 3d 20 nclude.mandir =
04b0: 24 28 70 72 65 66 69 78 29 2f 6d 61 6e 0a 0a 23 $(prefix)/man..#
04c0: 20 50 72 6f 67 72 61 6d 73 20 75 73 65 64 20 62 Programs used b
04d0: 79 20 22 6d 61 6b 65 22 3a 0a 43 43 20 3d 20 63 y "make":.CC = c
04e0: 6c 0a 43 46 4c 41 47 53 20 3d 20 24 28 4d 46 4c l.CFLAGS = $(MFL
04f0: 41 47 53 29 20 24 28 4f 50 54 49 4d 46 4c 41 47 AGS) $(OPTIMFLAG
0500: 53 29 0a 43 50 50 20 3d 20 63 6c 20 2d 45 0a 49 S).CPP = cl -E.I
0510: 4e 43 4c 55 44 45 53 20 3d 20 2d 49 2e 20 2d 49 NCLUDES = -I. -I
0520: 24 28 73 72 63 64 69 72 29 0a 41 52 20 3d 20 6c $(srcdir).AR = l
0530: 69 62 0a 41 52 5f 46 4c 41 47 53 20 3d 20 2f 6f ib.AR_FLAGS = /o
0540: 75 74 3a 0a 4d 56 20 3d 20 72 65 6e 0a 4c 4e 20 ut:.MV = ren.LN
0550: 3d 20 63 6f 70 79 0a 52 4d 20 3d 20 2d 64 65 6c = copy.RM = -del
0560: 0a 0a 23 20 50 72 6f 67 72 61 6d 73 20 75 73 65 ..# Programs use
0570: 64 20 62 79 20 22 6d 61 6b 65 20 69 6e 73 74 61 d by "make insta
0580: 6c 6c 22 3a 0a 49 4e 53 54 41 4c 4c 20 3d 20 40 ll":.INSTALL = @
0590: 49 4e 53 54 41 4c 4c 40 0a 49 4e 53 54 41 4c 4c INSTALL@.INSTALL
05a0: 5f 50 52 4f 47 52 41 4d 20 3d 20 40 49 4e 53 54 _PROGRAM = @INST
05b0: 41 4c 4c 5f 50 52 4f 47 52 41 4d 40 0a 49 4e 53 ALL_PROGRAM@.INS
05c0: 54 41 4c 4c 5f 44 41 54 41 20 3d 20 40 49 4e 53 TALL_DATA = @INS
05d0: 54 41 4c 4c 5f 44 41 54 41 40 0a 0a 23 23 23 23 TALL_DATA@..####
05e0: 20 45 6e 64 20 6f 66 20 73 79 73 74 65 6d 20 63 End of system c
05f0: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 73 65 63 onfiguration sec
0600: 74 69 6f 6e 2e 20 23 23 23 23 0a 0a 53 48 45 4c tion. ####..SHEL
0610: 4c 20 3d 20 2f 62 69 6e 2f 73 68 0a 0a 4f 42 4a L = /bin/sh..OBJ
0620: 45 43 54 53 20 3d 20 61 76 63 61 6c 6c 2e 6f 62 ECTS = avcall.ob
0630: 6a 20 73 74 72 75 63 74 63 70 79 2e 6f 62 6a 0a j structcpy.obj.
0640: 0a 61 6c 6c 20 3a 20 24 28 4f 42 4a 45 43 54 53 .all : $(OBJECTS
0650: 29 20 61 76 63 61 6c 6c 2e 6c 69 62 20 61 76 63 ) avcall.lib avc
0660: 61 6c 6c 2e 68 20 24 28 73 72 63 64 69 72 29 2f all.h $(srcdir)/
0670: 61 76 63 61 6c 6c 2e 33 20 24 28 73 72 63 64 69 avcall.3 $(srcdi
0680: 72 29 2f 61 76 63 61 6c 6c 2e 68 74 6d 6c 0a 0a r)/avcall.html..
0690: 61 76 63 61 6c 6c 2e 68 20 3a 20 61 76 63 61 6c avcall.h : avcal
06a0: 6c 2e 68 2e 6d 73 76 63 0a 09 24 28 52 4d 29 20 l.h.msvc..$(RM)
06b0: 61 76 63 61 6c 6c 2e 68 0a 09 24 28 4c 4e 29 20 avcall.h..$(LN)
06c0: 61 76 63 61 6c 6c 2e 68 2e 6d 73 76 63 20 61 76 avcall.h.msvc av
06d0: 63 61 6c 6c 2e 68 0a 0a 61 76 63 61 6c 6c 2e 6f call.h..avcall.o
06e0: 62 6a 20 3a 20 61 76 63 61 6c 6c 2d 24 28 43 50 bj : avcall-$(CP
06f0: 55 29 2e 6f 62 6a 0a 09 24 28 52 4d 29 20 61 76 U).obj..$(RM) av
0700: 63 61 6c 6c 2e 6f 62 6a 0a 09 24 28 4c 4e 29 20 call.obj..$(LN)
0710: 61 76 63 61 6c 6c 2d 24 28 43 50 55 29 2e 6f 62 avcall-$(CPU).ob
0720: 6a 20 61 76 63 61 6c 6c 2e 6f 62 6a 0a 0a 61 76 j avcall.obj..av
0730: 63 61 6c 6c 2d 69 33 38 36 2e 6f 62 6a 20 3a 20 call-i386.obj :
0740: 24 28 73 72 63 64 69 72 29 2f 61 76 63 61 6c 6c $(srcdir)/avcall
0750: 2d 69 33 38 36 2d 6d 73 76 63 2e 63 0a 09 24 28 -i386-msvc.c..$(
0760: 52 4d 29 20 61 76 63 61 6c 6c 2d 69 33 38 36 2e RM) avcall-i386.
0770: 6f 62 6a 0a 09 24 28 43 43 29 20 2d 63 20 24 28 obj..$(CC) -c $(
0780: 73 72 63 64 69 72 29 2f 61 76 63 61 6c 6c 2d 69 srcdir)/avcall-i
0790: 33 38 36 2d 6d 73 76 63 2e 63 20 2f 46 6f 61 76 386-msvc.c /Foav
07a0: 63 61 6c 6c 2d 69 33 38 36 2e 6f 62 6a 0a 0a 73 call-i386.obj..s
07b0: 74 72 75 63 74 63 70 79 2e 6f 62 6a 20 3a 20 24 tructcpy.obj : $
07c0: 28 73 72 63 64 69 72 29 2f 73 74 72 75 63 74 63 (srcdir)/structc
07d0: 70 79 2e 63 0a 09 24 28 43 43 29 20 24 28 43 46 py.c..$(CC) $(CF
07e0: 4c 41 47 53 29 20 2d 63 20 24 28 73 72 63 64 69 LAGS) -c $(srcdi
07f0: 72 29 2f 73 74 72 75 63 74 63 70 79 2e 63 0a 0a r)/structcpy.c..
0800: 21 69 66 20 21 24 28 44 4c 4c 29 0a 61 76 63 61 !if !$(DLL).avca
0810: 6c 6c 2e 6c 69 62 20 3a 20 24 28 4f 42 4a 45 43 ll.lib : $(OBJEC
0820: 54 53 29 0a 09 24 28 52 4d 29 20 61 76 63 61 6c TS)..$(RM) avcal
0830: 6c 2e 6c 69 62 0a 09 24 28 41 52 29 20 24 28 41 l.lib..$(AR) $(A
0840: 52 5f 46 4c 41 47 53 29 61 76 63 61 6c 6c 2e 6c R_FLAGS)avcall.l
0850: 69 62 20 24 28 4f 42 4a 45 43 54 53 29 0a 21 65 ib $(OBJECTS).!e
0860: 6c 73 65 0a 23 20 61 76 63 61 6c 6c 2e 64 6c 6c lse.# avcall.dll
0870: 20 61 6e 64 20 61 76 63 61 6c 6c 2e 6c 69 62 20 and avcall.lib
0880: 61 72 65 20 63 72 65 61 74 65 64 20 74 6f 67 65 are created toge
0890: 74 68 65 72 2e 0a 61 76 63 61 6c 6c 2e 6c 69 62 ther..avcall.lib
08a0: 20 3a 20 24 28 4f 42 4a 45 43 54 53 29 0a 09 24 : $(OBJECTS)..$
08b0: 28 43 43 29 20 24 28 4d 46 4c 41 47 53 29 20 2d (CC) $(MFLAGS) -
08c0: 4c 44 20 24 28 4f 42 4a 45 43 54 53 29 0a 21 65 LD $(OBJECTS).!e
08d0: 6e 64 69 66 0a 0a 74 65 73 74 73 2e 6f 62 6a 20 ndif..tests.obj
08e0: 3a 20 24 28 73 72 63 64 69 72 29 2f 74 65 73 74 : $(srcdir)/test
08f0: 73 2e 63 20 61 76 63 61 6c 6c 2e 68 0a 09 24 28 s.c avcall.h..$(
0900: 43 43 29 20 24 28 43 46 4c 41 47 53 29 20 24 28 CC) $(CFLAGS) $(
0910: 49 4e 43 4c 55 44 45 53 29 20 2d 63 20 24 28 73 INCLUDES) -c $(s
0920: 72 63 64 69 72 29 2f 74 65 73 74 73 2e 63 0a 0a rcdir)/tests.c..
0930: 74 65 73 74 73 2e 73 20 3a 20 24 28 73 72 63 64 tests.s : $(srcd
0940: 69 72 29 2f 74 65 73 74 73 2e 63 20 61 76 63 61 ir)/tests.c avca
0950: 6c 6c 2e 68 0a 09 24 28 43 43 29 20 24 28 43 46 ll.h..$(CC) $(CF
0960: 4c 41 47 53 29 20 24 28 49 4e 43 4c 55 44 45 53 LAGS) $(INCLUDES
0970: 29 20 2d 63 20 24 28 73 72 63 64 69 72 29 2f 74 ) -c $(srcdir)/t
0980: 65 73 74 73 2e 63 20 2f 46 41 73 20 2f 46 61 74 ests.c /FAs /Fat
0990: 65 73 74 73 2e 73 0a 0a 74 65 73 74 73 2e 65 78 ests.s..tests.ex
09a0: 65 20 3a 20 74 65 73 74 73 2e 6f 62 6a 20 61 76 e : tests.obj av
09b0: 63 61 6c 6c 2e 6c 69 62 0a 09 24 28 43 43 29 20 call.lib..$(CC)
09c0: 24 28 43 46 4c 41 47 53 29 20 74 65 73 74 73 2e $(CFLAGS) tests.
09d0: 6f 62 6a 20 61 76 63 61 6c 6c 2e 6c 69 62 20 2f obj avcall.lib /
09e0: 46 65 74 65 73 74 73 2e 65 78 65 0a 0a 75 6e 69 Fetests.exe..uni
09f0: 71 2d 75 2e 65 78 65 20 3a 20 24 28 73 72 63 64 q-u.exe : $(srcd
0a00: 69 72 29 2f 75 6e 69 71 2d 75 2e 63 0a 09 24 28 ir)/uniq-u.c..$(
0a10: 43 43 29 20 24 28 43 46 4c 41 47 53 29 20 24 28 CC) $(CFLAGS) $(
0a20: 73 72 63 64 69 72 29 2f 75 6e 69 71 2d 75 2e 63 srcdir)/uniq-u.c
0a30: 20 2d 46 65 75 6e 69 71 2d 75 2e 65 78 65 0a 09 -Feuniq-u.exe..
0a40: 24 28 52 4d 29 20 75 6e 69 71 2d 75 2e 6f 62 6a $(RM) uniq-u.obj
0a50: 0a 0a 63 68 65 63 6b 20 3a 20 61 6c 6c 20 74 65 ..check : all te
0a60: 73 74 73 2e 65 78 65 20 75 6e 69 71 2d 75 2e 65 sts.exe uniq-u.e
0a70: 78 65 0a 09 74 65 73 74 73 2e 65 78 65 20 3e 20 xe..tests.exe >
0a80: 74 65 73 74 73 2e 6f 75 74 0a 09 75 6e 69 71 2d tests.out..uniq-
0a90: 75 20 3c 20 74 65 73 74 73 2e 6f 75 74 20 3e 20 u < tests.out >
0aa0: 74 65 73 74 73 2e 6f 75 74 70 75 74 2e 24 28 48 tests.output.$(H
0ab0: 4f 53 54 29 0a 23 20 59 6f 75 20 68 61 76 65 20 OST).# You have
0ac0: 74 6f 20 63 68 65 63 6b 20 62 79 20 68 61 6e 64 to check by hand
0ad0: 20 74 68 61 74 20 74 65 73 74 73 2e 6f 75 74 70 that tests.outp
0ae0: 75 74 2e 24 28 48 4f 53 54 29 20 69 73 20 65 6d ut.$(HOST) is em
0af0: 70 74 79 2e 0a 0a 6d 6f 73 74 6c 79 63 6c 65 61 pty...mostlyclea
0b00: 6e 20 3a 20 63 6c 65 61 6e 0a 0a 63 6c 65 61 6e n : clean..clean
0b10: 20 3a 20 66 6f 72 63 65 0a 09 24 28 52 4d 29 20 : force..$(RM)
0b20: 2a 2e 6f 62 6a 20 2a 2e 6c 69 62 20 2a 2e 65 78 *.obj *.lib *.ex
0b30: 70 20 2a 2e 64 6c 6c 20 63 6f 72 65 0a 09 24 28 p *.dll core..$(
0b40: 52 4d 29 20 61 76 63 61 6c 6c 2d 69 33 38 36 2e RM) avcall-i386.
0b50: 73 0a 09 24 28 52 4d 29 20 74 65 73 74 73 2e 6f s..$(RM) tests.o
0b60: 62 6a 20 74 65 73 74 73 2e 73 20 74 65 73 74 73 bj tests.s tests
0b70: 2e 65 78 65 20 75 6e 69 71 2d 75 2e 65 78 65 20 .exe uniq-u.exe
0b80: 74 65 73 74 73 2e 6f 75 74 0a 0a 64 69 73 74 63 tests.out..distc
0b90: 6c 65 61 6e 20 3a 20 63 6c 65 61 6e 0a 09 24 28 lean : clean..$(
0ba0: 52 4d 29 20 63 6f 6e 66 69 67 2e 73 74 61 74 75 RM) config.statu
0bb0: 73 20 63 6f 6e 66 69 67 2e 6c 6f 67 20 63 6f 6e s config.log con
0bc0: 66 69 67 2e 63 61 63 68 65 20 4d 61 6b 65 66 69 fig.cache Makefi
0bd0: 6c 65 20 61 76 63 61 6c 6c 2e 68 20 74 65 73 74 le avcall.h test
0be0: 73 2e 6f 75 74 70 75 74 2e 2a 0a 0a 6d 61 69 6e s.output.*..main
0bf0: 74 61 69 6e 65 72 2d 63 6c 65 61 6e 20 3a 20 64 tainer-clean : d
0c00: 69 73 74 63 6c 65 61 6e 0a 0a 66 6f 72 63 65 20 istclean..force
0c10: 3a 0a 0a :..