/make/edam-mk

To get this branch, use:
bzr branch http://bzr.ed.am/make/edam-mk

« back to all changes in this revision

Viewing changes to edam.mk

  • Committer: edam
  • Date: 2012-03-26 15:31:11 UTC
  • Revision ID: tim@ed.am-20120326153111-ar79qfrghfop7lau
fixed spacing in NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#
3
3
#                       edam's general-purpose makefile
4
4
#_______________________________________________________________________________
5
 
#                                                                    version 3.4
 
5
#                                                                    version 3.5
6
6
#
7
7
# Copyright (c) 2009 Tim Marston <edam@waxworlds.org>.
8
8
#
119
119
# run          Builds the target of your Makefile and, if successful, runs it.
120
120
#              This is not available if you're building a library of some kind.
121
121
#
 
122
# debug        The same as the run goal, except instead of running the target,
 
123
#              it is debugged with gdb.
 
124
#
122
125
# clean        Deletes temporary files.
123
126
#
124
127
# clean_all    Deletes temporary files and then goes through then project's
171
174
LDFLAGS         := $(if $(LINKSTATIC),-static) $(LDFLAGS)
172
175
 
173
176
# add libraries for d
174
 
LIBRARIES       := $(LIBRARIES) $(if $(filter %.d, $(SOURCES)), gphobos pthread m)
 
177
LIBRARIES       := $(LIBRARIES) $(if $(filter %.d, $(SOURCES)), gphobos2 rt)
175
178
 
176
179
# build flags for libraries
177
180
LDPOSTFLAGS := $(addprefix -l,$(LIBRARIES)) $(LDPOSTFLAGS)
224
227
#_______________________________________________________________________________
225
228
#                                                                          RULES
226
229
 
227
 
.PHONY: all subdirs subprojs target clean clean_all run depend dep \
 
230
.PHONY: all subdirs subprojs target clean clean_all run debug depend dep \
228
231
        $(SUBDIRS) $(SUBPROJS)
229
232
 
230
233
all: subdirs subprojs target
250
253
ifndef MKSHAREDLIB
251
254
run: target
252
255
        ./$(TARGET)
 
256
 
 
257
debug: target
 
258
        gdb ./$(TARGET)
253
259
endif
254
260
endif
255
261