Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CompilerConstruction
CodeSamples
Commits
ca222f55
Commit
ca222f55
authored
May 02, 2020
by
Ronald Charles Moore
Browse files
tweeked Makefile
parent
21999010
Changes
1
Hide whitespace changes
Inline
Side-by-side
recursiveDescentParsers/cplusplus/interpret++/Makefile
View file @
ca222f55
...
...
@@ -48,21 +48,27 @@ all: $(PROGS)
# http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
# ... and then fixed, and fixed, and fixed some more.
DEPDIR
:=
.deps
# Broken: DEPFLAGS = -MT $@ -MMD -MP -MF $(DEPDIR)/$*.d
DEPFLAGS
=
-MMD
-MF
$(DEPDIR)
/
$*
.d
# From URL: DEPFLAGS = -MT $@ -MMD -MP -MF $(DEPDIR)/$*.d
# Simpler, better...
DEPFLAGS
=
-MMD
-MP
-MF
$(DEPDIR)
/
$*
.d
# include dep files, if they exist (minus says don't complain if they don't)
DEPS
:=
$
(
OBJS:%.o
=
$(DEPDIR)
/%.d
)
#include the deps (minus says don't complain if they don't)
-include
$(DEPS)
%.o
:
%.cpp %.d
$(CC)
-c
$(CPPFLAGS)
$(DEPFLAGS)
-o
$@
$<
# %.o $(DEPDIR)/%.d : %.cpp $(DEPDIR)
%.o
:
%.cpp $(DEPDIR)
$(CC)
-c
$(CPPFLAGS)
$(DEPFLAGS)
-o
$*
.o
$*
.cpp
# Make depdir if it doesn't exist...
$(DEPDIR)
:
; @mkdir -p $@
## Now, the targets -- the things that will get made!
# generate dep files. Note missing "-o" to keep from generating them too
# $(DEPDIR)/%.d : $(DEPDIR)
# $(CC) -c $(CPPFLAGS) $(DEPFLAGS) $*.cpp
## Now, the REAL targets -- the things that will get made!
$(PROGS)
:
$(OBJS)
$(CC)
$(CPPFLAGS)
$(OBJS)
$(LIBS)
-o
$@
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment