1 | # $Id: makefile.gcc,v 1.5 2000-05-13 17:17:46 bird Exp $
|
---|
2 |
|
---|
3 | #
|
---|
4 | # PD-Win32 API
|
---|
5 | #
|
---|
6 | # Tools common library, GCC version.
|
---|
7 | #
|
---|
8 | #
|
---|
9 |
|
---|
10 |
|
---|
11 | #
|
---|
12 | # If OMF flag isn't set, set it to default value.
|
---|
13 | #
|
---|
14 | !ifndef OMF
|
---|
15 | OMF=0
|
---|
16 | !endif
|
---|
17 |
|
---|
18 |
|
---|
19 | #
|
---|
20 | # Directories and common tools.
|
---|
21 | #
|
---|
22 | PDWIN32_INCLUDE = ..\..\include
|
---|
23 | PDWIN32_BIN = ..\..\bin\$(OBJDIR)
|
---|
24 | PDWIN32_LIB = ..\..\lib
|
---|
25 | PDWIN32_TOOLS = ..\bin
|
---|
26 | PDWIN32_TCOMMON = ..\common
|
---|
27 | !include $(PDWIN32_INCLUDE)\pdwin32.tools
|
---|
28 |
|
---|
29 | # Definitions for pdwin32.post
|
---|
30 | LOCALCLEAN = 1
|
---|
31 | CLEANEXTRAS = commongcc.*
|
---|
32 |
|
---|
33 |
|
---|
34 | #
|
---|
35 | # gcc defines
|
---|
36 | #
|
---|
37 | CC = gcc
|
---|
38 | CXX = gcc
|
---|
39 | LD = gcc
|
---|
40 | !ifdef DEBUG
|
---|
41 | OBJDIR = .\bin\debug
|
---|
42 | !else
|
---|
43 | OBJDIR = .\bin\release
|
---|
44 | !endif
|
---|
45 |
|
---|
46 |
|
---|
47 | !if $(OMF) == 0
|
---|
48 | # aout version
|
---|
49 | O = o
|
---|
50 | LIB = a
|
---|
51 | AR = ar
|
---|
52 | CFZOMF =
|
---|
53 |
|
---|
54 | !else
|
---|
55 | # OMF version
|
---|
56 | O = gobj
|
---|
57 | LIB = lib
|
---|
58 | AR = emxomfar
|
---|
59 | CFZOMF = -Zomf
|
---|
60 |
|
---|
61 | !endif
|
---|
62 |
|
---|
63 |
|
---|
64 | CDEFINES = -D__WIN32OS2__ -D__WINE__
|
---|
65 | CINCLUDES = -I$(PDWIN32_INCLUDE)\Win -I$(PDWIN32_INCLUDE)
|
---|
66 | CPLUS_INCLUDE_PATH= $(CPLUS_INCLUDE_PATH);$(INCLUDE)
|
---|
67 |
|
---|
68 | # Note: Add -fhandle-exceptions if old gcc version (< 2.8.x?).
|
---|
69 | !ifndef DEBUG
|
---|
70 | CFLAGS = $(CFZOMF) -Wall -Zmap -Zmt -mprobe -Wall -s -O
|
---|
71 | !else
|
---|
72 | CFLAGS = $(CFZOMF) -Wall -Zmap -Zmt -mprobe -Wall -g
|
---|
73 | !endif
|
---|
74 | CXXFLAGS = $(CFLAGS)
|
---|
75 |
|
---|
76 |
|
---|
77 | #
|
---|
78 | # Interference rules
|
---|
79 | #
|
---|
80 | .c{$(OBJDIR)}.$(O):
|
---|
81 | $(CC) -c $(CFLAGS) $(CDEFINES) $(CINCLUDES) $< -o $@
|
---|
82 |
|
---|
83 | .cpp{$(OBJDIR)}.$(O):
|
---|
84 | $(CXX) -c $(CXXFLAGS) $(CDEFINES) $(CINCLUDES) $< -o $@
|
---|
85 |
|
---|
86 |
|
---|
87 | #
|
---|
88 | # Object files.
|
---|
89 | #
|
---|
90 | OBJS = \
|
---|
91 | $(OBJDIR)\kFilePe.$(O) \
|
---|
92 | $(OBJDIR)\kFileDef.$(O) \
|
---|
93 | $(OBJDIR)\kFileLx.$(O) \
|
---|
94 | $(OBJDIR)\kFileFormatBase.$(O)
|
---|
95 |
|
---|
96 |
|
---|
97 | #
|
---|
98 | # All rule.
|
---|
99 | #
|
---|
100 | all: $(OBJDIR) \
|
---|
101 | commongcc.$(LIB)
|
---|
102 |
|
---|
103 |
|
---|
104 | $(OBJDIR)\commongcc.$(LIB): $(OBJS)
|
---|
105 | $(RM) $@
|
---|
106 | $(AR) cr $@ $(OBJS)
|
---|
107 |
|
---|
108 | commongcc.$(LIB): $(OBJDIR)\commongcc.$(LIB)
|
---|
109 | $(CP) $** $@
|
---|
110 |
|
---|
111 |
|
---|
112 | #
|
---|
113 | # dependent rule. forward to main makefile.
|
---|
114 | #
|
---|
115 | dep:
|
---|
116 | @$(MAKE) /nologo -f makefile NODEP=1 dep
|
---|
117 |
|
---|
118 |
|
---|
119 | # Includes the common rules.
|
---|
120 | !include $(PDWIN32_INCLUDE)/pdwin32.post
|
---|
121 |
|
---|