aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-11-07 10:39:22 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-11-07 10:39:22 -0800
commitaf75d8303c459594df0884204d20b8d8cb443c11 (patch)
treea40a26ef723385971afe0bf8dda8bd4bb27dc2c3
parenta137b3ea396213374c25563783337a07bd7e076b (diff)
Moved old bits of Makefile to Makefile.old.
-rw-r--r--Makefile41
-rw-r--r--Makefile.old47
2 files changed, 47 insertions, 41 deletions
diff --git a/Makefile b/Makefile
index 02c869c..b9235a5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,14 +1,10 @@
-CFLAGS?=-g -O3 -Wall -Wextra -std=c99 -Isrc -Wno-missing-field-initializers -fPIC $(OPTCFLAGS)
-LDFLAGS?=-g -O3 -Wall -Werror -fPIC $(OPTLDFLAGS)
SRCDIR?=src
DATADIR?=data
BENCHINP?=README.md
JSMODULES=$(wildcard js/lib/*.js)
-PREFIX?=/usr/local
SPEC=spec.txt
SITE=_site
SPECVERSION=$(shell grep version: $(SPEC) | sed -e 's/version: *//')
-
BUILDDIR=build
PROG?=$(BUILDDIR)/src/cmark
@@ -63,45 +59,9 @@ jshint:
benchjs:
node js/bench.js ${BENCHINP}
-#HTML_OBJ=$(SRCDIR)/html/html.o $(SRCDIR)/html/houdini_href_e.o $(SRCDIR)/html/houdini_html_e.o $(SRCDIR)/html/houdini_html_u.o
-#
-#CMARK_OBJ=$(SRCDIR)/inlines.o $(SRCDIR)/buffer.o $(SRCDIR)/blocks.o $(SRCDIR)/scanners.c $(SRCDIR)/print.o $(SRCDIR)/utf8.o $(SRCDIR)/references.o
-#
-#CMARK_HDR = $(SRCDIR)/cmark.h $(SRCDIR)/buffer.h $(SRCDIR)/references.h \
-# $(SRCDIR)/chunk.h $(SRCDIR)/debug.h $(SRCDIR)/utf8.h \
-# $(SRCDIR)/scanners.h $(SRCDIR)/inlines.h
-#
-#HTML_HDR = $(SRCDIR)/html/html_unescape.h $(SRCDIR)/html/houdini.h
-#
-#$(PROG): $(SRCDIR)/html/html_unescape.h $(SRCDIR)/case_fold_switch.inc $(HTML_OBJ) $(CMARK_OBJ) $(SRCDIR)/main.c
-# $(CC) $(LDFLAGS) -o $@ $(HTML_OBJ) $(CMARK_OBJ) $(SRCDIR)/main.c
-#
-#$(SRCDIR)/scanners.c: $(SRCDIR)/scanners.re
-# re2c --case-insensitive -bis $< > $@ || (rm $@ && false)
-
-
$(SRCDIR)/case_fold_switch.inc: $(DATADIR)/CaseFolding-3.2.0.txt
perl mkcasefold.pl < $< > $@
-#$(SRCDIR)/html/html_unescape.h: $(SRCDIR)/html/html_unescape.gperf
-# gperf -I -t -N find_entity -H hash_entity -K entity -C -l
-# --null-strings -m5 $< > $@
-#
-#libcommonmark.so: $(HTML_OBJ) $(CMARK_OBJ)
-# $(CC) $(LDFLAGS) -shared -o $@ $^
-#
-#install: libcommonmark.so $(cmark_HDR) $(HTML_HDR)
-# install -d $(PREFIX)/lib $(PREFIX)/include/cmark/html
-# install libcommonmark.so $(PREFIX)/lib/
-# install $(cmark_HDR) $(PREFIX)/include/cmark/
-# install $(HTML_HDR) $(PREFIX)/include/cmark/html/
-
-#CMARK_HDR = $(SRCDIR)/cmark.h $(SRCDIR)/buffer.h $(SRCDIR)/references.h \
-# $(SRCDIR)/chunk.h $(SRCDIR)/debug.h $(SRCDIR)/utf8.h \
-# $(SRCDIR)/scanners.h $(SRCDIR)/inlines.h
-#
-#HTML_HDR = $(SRCDIR)/html/html_unescape.h $(SRCDIR)/html/houdini.h
-
dingus: js/commonmark.js
echo "Starting dingus server at http://localhost:9000" && python -m SimpleHTTPServer 9000
@@ -133,7 +93,6 @@ upload-site:
cd $(SITE) ; git pull; git commit -a -m "Updated site for latest spec, js" ; git push; cd ..
distclean: clean
- -rm -f test $(SRCDIR)/*.o $(SRCDIR)/scanners.c $(SRCDIR)/html/*.o libcommonmark.so
-rm -f js/commonmark.js
-rm -rf *.dSYM
-rm -f README.html
diff --git a/Makefile.old b/Makefile.old
new file mode 100644
index 0000000..bbfe06c
--- /dev/null
+++ b/Makefile.old
@@ -0,0 +1,47 @@
+PREFIX?=/usr/local
+SRCDIR?=src
+CFLAGS?=-g -O3 -Wall -Wextra -std=c99 -Isrc -Wno-missing-field-initializers -fPIC $(OPTCFLAGS)
+LDFLAGS?=-g -O3 -Wall -Werror -fPIC $(OPTLDFLAGS)
+
+HTML_OBJ=$(SRCDIR)/html/html.o $(SRCDIR)/html/houdini_href_e.o $(SRCDIR)/html/houdini_html_e.o $(SRCDIR)/html/houdini_html_u.o
+
+CMARK_OBJ=$(SRCDIR)/inlines.o $(SRCDIR)/buffer.o $(SRCDIR)/blocks.o $(SRCDIR)/scanners.c $(SRCDIR)/print.o $(SRCDIR)/utf8.o $(SRCDIR)/references.o
+
+CMARK_HDR = $(SRCDIR)/cmark.h $(SRCDIR)/buffer.h $(SRCDIR)/references.h \
+ $(SRCDIR)/chunk.h $(SRCDIR)/debug.h $(SRCDIR)/utf8.h \
+ $(SRCDIR)/scanners.h $(SRCDIR)/inlines.h
+
+HTML_HDR = $(SRCDIR)/html/html_unescape.h $(SRCDIR)/html/houdini.h
+
+$(PROG): $(SRCDIR)/html/html_unescape.h $(SRCDIR)/case_fold_switch.inc $(HTML_OBJ) $(CMARK_OBJ) $(SRCDIR)/main.c
+ $(CC) $(LDFLAGS) -o $@ $(HTML_OBJ) $(CMARK_OBJ) $(SRCDIR)/main.c
+
+$(SRCDIR)/scanners.c: $(SRCDIR)/scanners.re
+ re2c --case-insensitive -bis $< > $@ || (rm $@ && false)
+
+
+$(SRCDIR)/html/html_unescape.h: $(SRCDIR)/html/html_unescape.gperf
+ gperf -I -t -N find_entity -H hash_entity -K entity -C -l
+ --null-strings -m5 $< > $@
+
+libcommonmark.so: $(HTML_OBJ) $(CMARK_OBJ)
+ $(CC) $(LDFLAGS) -shared -o $@ $^
+
+install: libcommonmark.so $(cmark_HDR) $(HTML_HDR)
+ install -d $(PREFIX)/lib $(PREFIX)/include/cmark/html
+ install libcommonmark.so $(PREFIX)/lib/
+ install $(cmark_HDR) $(PREFIX)/include/cmark/
+ install $(HTML_HDR) $(PREFIX)/include/cmark/html/
+
+CMARK_HDR = $(SRCDIR)/cmark.h $(SRCDIR)/buffer.h $(SRCDIR)/references.h \
+ $(SRCDIR)/chunk.h $(SRCDIR)/debug.h $(SRCDIR)/utf8.h \
+ $(SRCDIR)/scanners.h $(SRCDIR)/inlines.h
+
+HTML_HDR = $(SRCDIR)/html/html_unescape.h $(SRCDIR)/html/houdini.h
+
+clean:
+ -rm -f test $(SRCDIR)/*.o $(SRCDIR)/scanners.c $(SRCDIR)/html/*.o libcommonmark.so
+ -rm -f js/commonmark.js
+ -rm -rf *.dSYM
+ -rm -f README.html
+ -rm -f spec.md fuzz.txt spec.html