Changed the Makefile to put the output files of GHC (*.o,*.hi) into an obj directory, to stop them cluttering up the source directories
This commit is contained in:
parent
2ff46a9041
commit
8514823f1f
10
Makefile
10
Makefile
|
@ -4,7 +4,7 @@ all: $(targets)
|
|||
|
||||
sources = $(wildcard *.hs frontends/*.hs backends/*.hs transformations/*.hs common/*.hs) $(patsubst %.x,%.hs,$(wildcard frontends/*.x))
|
||||
|
||||
builtfiles = $(patsubst %.hs,%.hi,$(sources)) $(patsubst %.hs,%.o,$(sources)) $(patsubst %.x,%.hs,$(wildcard frontends/*.x))
|
||||
builtfiles = $(patsubst %.x,%.hs,$(wildcard frontends/*.x))
|
||||
|
||||
%.hs: %.x
|
||||
alex $<
|
||||
|
@ -18,10 +18,12 @@ ghc_opts = \
|
|||
$(profile_opts)
|
||||
|
||||
tock: $(sources)
|
||||
ghc $(ghc_opts) -o tock --make Main
|
||||
mkdir -p obj
|
||||
ghc $(ghc_opts) -o tock --make Main -odir obj -hidir obj
|
||||
|
||||
tocktest: $(sources)
|
||||
ghc $(ghc_opts) -o tocktest -main-is TestMain --make TestMain
|
||||
mkdir -p obj
|
||||
ghc $(ghc_opts) -o tocktest -main-is TestMain --make TestMain -odir obj -hidir obj
|
||||
|
||||
CFLAGS = \
|
||||
-O2 \
|
||||
|
@ -77,7 +79,7 @@ haddock:
|
|||
@mv doc/index.html-2 doc/index.html
|
||||
|
||||
clean:
|
||||
rm -f $(targets) $(builtfiles)
|
||||
rm -f $(targets) $(builtfiles) obj/*.o obj/*.hi
|
||||
|
||||
# Don't delete intermediate files.
|
||||
.SECONDARY:
|
||||
|
|
Loading…
Reference in New Issue
Block a user