File: libschily.mk

package info (click to toggle)
sformat 3.4-1
  • links: PTS
  • area: main
  • in suites: potato, slink
  • size: 2,056 kB
  • ctags: 3,432
  • sloc: ansic: 20,874; makefile: 98; sh: 95
file content (77 lines) | stat: -rw-r--r-- 2,879 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ident %W% %E% %Q%
###########################################################################
SRCROOT=	..
RULESDIR=	RULES
include		$(SRCROOT)/$(RULESDIR)/rules.top
###########################################################################

.SEARCHLIST:	. $(ARCHDIR) stdio $(ARCHDIR)
VPATH=		.:stdio:$(ARCHDIR)
INSDIR=		lib
TARGETLIB=	schily
CPPOPTS +=	-DBSD4_2 -DNO_SCANSTACK
include		Targets
LIBS=		

###########################################################################
include		$(SRCROOT)/$(RULESDIR)/rules.lib
###########################################################################
#CC=		echo "	==> COMPILING \"$@\""; cc
###########################################################################
# Gmake has a bug with the VPATH= option. Some of the macros are
# not correctly expanded. I had to remove all occurrences of
# $@ $* and $^ on some places for this reason.
###########################################################################

.INIT:
	@echo "	==> The folloging messages may occur:"
	@echo "	==> cannot find include file: <align.h>"
	@echo "	==> cannot find include file: <avoffset.h>"
	@echo "	==> this is not an error, these files are made during the build."

cmpbytes.o fillbytes.o movebytes.o: align.h
$(ARCHDIR)/cmpbytes.o $(ARCHDIR)/fillbytes.o $(ARCHDIR)/movebytes.o: align.h

align_test.o:	align_test.c
		$(CC) -c $(CPPFLAGS) -o $(ARCHDIR)/align_test.o align_test.c

align_test:	align_test.o
		$(LDCC) -o $(ARCHDIR)/align_test $(ARCHDIR)/align_test.o

align.h:	align_test
		$(ARCHDIR)/align_test > $(ARCHDIR)/align.h

getav0.o:	avoffset.h
$(ARCHDIR)/getav0.o:	avoffset.h
saveargs.o:	avoffset.h
$(ARCHDIR)/saveargs.o:	avoffset.h

avoffset.o:	avoffset.c
		$(CC) -c $(CPPFLAGS) -o $(ARCHDIR)/avoffset.o avoffset.c

avoffset:	avoffset.o getfp.o
		$(LDCC) -o $(ARCHDIR)/avoffset $(ARCHDIR)/avoffset.o $(ARCHDIR)/getfp.o

avoffset.h:	avoffset
		-$(ARCHDIR)/avoffset > $(ARCHDIR)/avoffset.h

###########################################################################
# The next line is needed for old buggy gmake releases before release 3.74.
# Sources before gmake 3.75 now are no longer available on ftp servers,
# the GNU people seem to know why ;-)
# Only one line is needed to have a rule for creating the OBJ dir.
# Do not insert more then one line with $(ARCHDIR) on the right side
# gmake would go into infinite loops otherwise.
###########################################################################
$(ARCHDIRX)align_test$(DEP_SUFFIX):	$(ARCHDIR)

include		$(ARCHDIRX)avoffset$(DEP_SUFFIX)
include		$(ARCHDIRX)align_test$(DEP_SUFFIX)

CLEAN_FILEX=	$(ARCHDIR)/align_test.o $(ARCHDIR)/align_test
CLEAN_FILEX +=	$(ARCHDIR)/avoffset.o $(ARCHDIR)/avoffset

CLOBBER_FILEX=	$(ARCHDIR)/align_test.d $(ARCHDIR)/align_test.dep \
		$(ARCHDIR)/align.h
CLOBBER_FILEX += $(ARCHDIR)/avoffset.d $(ARCHDIR)/avoffset.dep \
		$(ARCHDIR)/avoffset.h