Mercurial > hg > dmlib
comparison Makefile.gen @ 166:112eb95f2fba
Improve build system granularity.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 06 Oct 2012 08:31:37 +0300 |
parents | a49d431ff40e |
children | 63ff0fb944cd |
comparison
equal
deleted
inserted
replaced
165:3e8e0dc30711 | 166:112eb95f2fba |
---|---|
38 | 38 |
39 ### | 39 ### |
40 ### Filesystem | 40 ### Filesystem |
41 ### | 41 ### |
42 ifeq ($(DM_USE_PACKFS),yes) | 42 ifeq ($(DM_USE_PACKFS),yes) |
43 BUILD_RES=yes | |
43 DM_CFLAGS += -DDM_USE_PACKFS | 44 DM_CFLAGS += -DDM_USE_PACKFS |
44 DMLIB_OBJS += dmpack.o dmpackutil.o | 45 DMLIB_OBJS += dmpack.o dmpackutil.o |
45 DM_LDFLAGS += -lz | 46 DM_LDFLAGS += -lz |
46 ifeq ($(DM_BUILD_TOOLS),yes) | 47 ifeq ($(DM_BUILD_TOOLS),yes) |
47 BINARIES += packed | 48 BINARIES += packed |
48 endif | 49 endif |
49 endif | 50 endif |
50 | 51 |
51 ifeq ($(DM_USE_STDIO),yes) | 52 ifeq ($(DM_USE_STDIO),yes) |
53 BUILD_RES=yes | |
52 DM_CFLAGS += -DDM_USE_STDIO | 54 DM_CFLAGS += -DDM_USE_STDIO |
53 endif | 55 endif |
54 | 56 |
57 ifeq ($(DM_USE_MEMIO),yes) | |
58 BUILD_RES=yes | |
59 DM_CFLAGS += -DDM_USE_MEMIO | |
60 endif | |
61 | |
62 ifeq ($(BUILD_RES),yes) | |
63 DMLIB_OBJS += dmres.o dmresw.o | |
64 endif | |
55 | 65 |
56 ### | 66 ### |
57 ### Graphics support | 67 ### Graphics support |
58 ### | 68 ### |
59 | 69 |
74 | 84 |
75 ifeq ($(DM_GFX_BM_TEXT),yes) | 85 ifeq ($(DM_GFX_BM_TEXT),yes) |
76 DM_CFLAGS += -DDM_GFX_BM_TEXT | 86 DM_CFLAGS += -DDM_GFX_BM_TEXT |
77 DMLIB_OBJS += dmtext_bm.o | 87 DMLIB_OBJS += dmtext_bm.o |
78 ifeq ($(DM_BUILD_TOOLS),yes) | 88 ifeq ($(DM_BUILD_TOOLS),yes) |
89 ifeq ($(DM_USE_STDIO),yes) | |
79 BINARIES += fontconv | 90 BINARIES += fontconv |
91 endif | |
80 endif | 92 endif |
81 endif | 93 endif |
82 | 94 |
83 ifeq ($(DM_GFX_TTF_TEXT),yes) | 95 ifeq ($(DM_GFX_TTF_TEXT),yes) |
84 DM_CFLAGS += -DDM_GFX_TTF_TEXT | 96 DM_CFLAGS += -DDM_GFX_TTF_TEXT |
85 DMLIB_OBJS += dmtext_ttf.o | 97 DMLIB_OBJS += dmtext_ttf.o |
86 | 98 |
87 ifeq ($(DM_BUILD_TESTS),yes) | 99 ifeq ($(DM_BUILD_TESTS),yes) |
88 ifeq ($(DM_GFX_BLITS),yes) | 100 ifeq ($(DM_GFX_BLITS),yes) |
101 ifeq ($(DM_USE_STDIO),yes) | |
89 BINARIES += blittest vview vptest efu | 102 BINARIES += blittest vview vptest efu |
103 endif | |
90 endif | 104 endif |
91 endif | 105 endif |
92 endif | 106 endif |
93 | 107 |
94 ifeq ($(DM_GFX_8BIT),yes) | 108 ifeq ($(DM_GFX_8BIT),yes) |
159 | 173 |
160 ### Dependancies | 174 ### Dependancies |
161 ifeq ($(DM_BUILD_TOOLS),yes) | 175 ifeq ($(DM_BUILD_TOOLS),yes) |
162 ifeq ($(DM_USE_STDIO),yes) | 176 ifeq ($(DM_USE_STDIO),yes) |
163 ifeq ($(SUP_MODLOAD),yes) | 177 ifeq ($(SUP_MODLOAD),yes) |
164 BINARIES+= viewmod mod2wav testpl ppl | 178 BINARIES+= viewmod mod2wav testpl |
179 ifeq ($(DM_GFX_BM_TEXT),yes) | |
180 ifeq ($(DM_GFX_BLITS),yes) | |
181 ifeq ($(DM_GFX_MISC),yes) | |
182 BINARIES+= ppl | |
183 endif | |
184 endif | |
185 endif | |
165 endif | 186 endif |
166 | 187 |
167 ifeq ($(JSS_SUP_JSSMOD),yes) | 188 ifeq ($(JSS_SUP_JSSMOD),yes) |
168 ifeq ($(JSS_SUP_XM),yes) | 189 ifeq ($(JSS_SUP_XM),yes) |
169 BINARIES+= xm2jss | 190 BINARIES+= xm2jss |
175 | 196 |
176 DMLIB_OBJS += jss.o jssmix.o jssmod.o jssplr.o | 197 DMLIB_OBJS += jss.o jssmix.o jssmod.o jssplr.o |
177 | 198 |
178 endif | 199 endif |
179 | 200 |
201 | |
180 ### | 202 ### |
181 ### Rest of the rules | 203 ### Rest of the rules |
182 ### | 204 ### |
183 CFLAGS += -g -W -Wall -DHAVE_STRING_H -O3 $(EXTRA_CFLAGS) | 205 CFLAGS += -g -W -Wall -DHAVE_STRING_H -O3 $(EXTRA_CFLAGS) |
184 CXXFLAGS=$(CFLAGS) | 206 CXXFLAGS=$(CFLAGS) |
188 | 210 |
189 | 211 |
190 DMLIB_A=$(OBJPATH)dmlib.a | 212 DMLIB_A=$(OBJPATH)dmlib.a |
191 DMLIB_OBJS += dmfile.o dmlib.o dmlerp.o dmstring.o \ | 213 DMLIB_OBJS += dmfile.o dmlib.o dmlerp.o dmstring.o \ |
192 dmargs.o dmvecmat.o dmperlin.o dmimage.o \ | 214 dmargs.o dmvecmat.o dmperlin.o dmimage.o \ |
193 dmres.o dmresw.o dmsimple.o | 215 dmsimple.o |
194 | 216 |
195 ifeq ($(DM_BUILD_TESTS),yes) | 217 ifeq ($(DM_BUILD_TESTS),yes) |
196 BINARIES += vecmattest fptest | 218 BINARIES += vecmattest fptest |
197 endif | 219 endif |
198 | 220 |