File: makefile

package info (click to toggle)
dosemu-freedos 1%3A0.0.b9r5a%2Betch.1-0etch1
  • links: PTS
  • area: contrib
  • in suites: etch
  • size: 19,744 kB
  • ctags: 23,279
  • sloc: ansic: 143,864; asm: 20,397; makefile: 3,868; perl: 1,106; yacc: 690; sh: 553; pascal: 297; xml: 150; cpp: 67
file content (107 lines) | stat: -rw-r--r-- 2,684 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
##!dmake -f

.SWAP :

# main goal of this Makefile:
# LLIB.EXE, Librarian for OBJ files

# source in the Free-Dos initialization 
.INCLUDE .FIRST .IGNORE : fd_init.mk ../fd_init.mk ../../fd_init.mk

#
#Project related settings
#
PRG = llib.exe
SRC = lib.c libber.c list.c mktmp.c mlib.c tmplist.c types.c
OBJ = lib.obj libber.obj list.obj mktmp.obj mlib.obj tmplist.obj types.obj
HDR = dbug.h config.h list.h mlib.h lib.h yerror.h types.h tmplist.h
MYCFLAGS = # TEST=YES
MSGLIB !:= msg.lib
MSGDCL !:= yerror.h
LDLIBS = $(MSGLIB) $(FDLIB)\$(_MODEL)_$(LNG).lib $(FDLIB)\Suppl_$(_MODEL).lib
.IF $(_COMPTYPE) == BC
# Disable all the exception handling stuff
LDLIBS += noeh$(eq,$(_MODEL),t s $(_MODEL)).lib
.ENDIF

.IF $(_COMPILER) != MC
.IF $(NDEBUG)
.ELSE
OBJ += dbug.obj
SRC += dbug.c
.ENDIF
.ENDIF
#
#First target
#
all : $(PRG)	# copy library into Free-Dos library dir

.INIT : $(CFG) tags refs errlist # Will make the utilizing files

#
#C initialization file
#
.IF $(CFG)
# Compiler configuration file, for Borland C only
# options: no Windows, no RTTI, use pre-compiled headers, no floating point

CONFIGURATION = -W-	\
-X-	\
-H	\
-I.;$(INCDIR)	\
-L.;$(LIBDIR)	\
-H=libber.csm	\
-f-	\
-ff-	\
-m$(_MODEL)

.IF $(NDEBUG)
.ELSE
CONFIGURATION += -N
.ENDIF

.IF $(_COMPILER) == BC45
CONFIGURATION += -RT- -lye -lyx
.ENDIF

$(CFG) : $(MAKEFILE:s/-f//)
	Cat $(mktmp $(CONFIGURATION:t"\n")\n) >$@

.ENDIF


$(PRG) .SWAP : $(MSGLIB) $(OBJ) 
	@+if exist $(PRG) del $(PRG) >nul
.IF $(_COMPILER) == MC
	$(LD) $(LDFLAGS) $(MCDIR)\Pc86rl_s @$(mktmp $(OBJ:t" ") \n), $@, NUL,@$(mktmp $(LDLIBS:t" ") $(MCDIR)\Mclib\n)
.ELSE
	$(CC) $(CCLDFLAGS) -e$@ @$(mktmp $(OBJ:t"\n") $(LDLIBS:t"\n")\n)
.ENDIF

dbug.obj : dbug.c dbug.h

#MAKEDEP START
lib.obj : lib.c \
	 .\config.h .\dbug.h .\lib.h .\list.h .\mlib.h .\tmplist.h .\types.h \
	.\yerror.h
libber.obj : libber.c \
	 .\config.h .\dbug.h .\lib.h .\list.h .\tmplist.h .\types.h .\yerror.h
list.obj : list.c \
	 .\config.h .\dbug.h .\lib.h .\list.h .\types.h .\yerror.h
mktmp.obj : mktmp.c \
	 .\config.h .\dbug.h .\types.h .\yerror.h
mlib.obj : mlib.c \
	 .\config.h .\dbug.h .\lib.h .\list.h .\mlib.h .\tmplist.h .\types.h \
	.\yerror.h
tmplist.obj : tmplist.c \
	 .\config.h .\dbug.h .\lib.h .\list.h .\tmplist.h .\types.h .\yerror.h
types.obj : types.c \
	 .\config.h .\dbug.h .\types.h .\yerror.h
#MAKEDEP STOP

clean ::
	$(RM) $(RMFLAGS) -s yerror.h__ q*.asm q*.cp q*.co $$*.asm $$*.cp $$*.co
	$(RM) /fs $(LNG).man $(LNG).tx

# source in the Free-Dos standard targets 
.INCLUDE .FIRST .IGNORE : fd_exit.mk ../fd_exit.mk ../../fd_exit.mk