aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile18
-rw-r--r--g2x.c6
2 files changed, 7 insertions, 17 deletions
diff --git a/Makefile b/Makefile
index 4f2f0c0..7fd641c 100644
--- a/Makefile
+++ b/Makefile
@@ -3,28 +3,18 @@
RM := /bin/rm
DESTDIR := /usr/local/bin
-CFLAGS := -std=c99 -Wfloat-equal -Og
+CFLAGS := -std=c99 -Wfloat-equal
CFLAGS += -Wall -Werror -Wextra -Wpedantic
CFLAGS += -m64 -no-pie -pipe
-CFLAGS += -ffunction-sections -fdata-sections
-CFLAGS += -D_XOPEN_SOURCE=500L -flto
+CFLAGS += -D_XOPEN_SOURCE=500L
CFLAGS += -march=native -mtune=generic
LDFLAGS := -static -Wl,--build-id=none
-LDFLAGS += -ffunction-sections -fdata-sections
-#LDFLAGS += -Wl,--strip-all
-LDFLAGS += -Wl,--flto
.SUFFIXES: .c .o
-g2x: $(FILES) *.o
- $(CC) $(LDFLAGS) *.o -o g2x
-
-.c.o:
- $(CC) $(CFLAGS) -c *.c
-
-clean:
- $(RM) ./*.o
+g2x: *.c
+ $(CC) -o g2x $(LDFLAGS) $(CFLAGS) g2x.c
install:
install -s -m 0755 g2x $(DESTDIR)
diff --git a/g2x.c b/g2x.c
index 8416472..7fdebb7 100644
--- a/g2x.c
+++ b/g2x.c
@@ -33,11 +33,11 @@ int main(void)
while (getbuf() != NULL)
{
if (!strncmp(buf,"###",3)) {
- html("<h3>"); xmlput(4); html("</h3>");
+ html("<h3>"); xmlput(4); html("</h3>\n");
} else if (!strncmp(buf,"##",2)) {
- html("<h2>"); xmlput(3); html("</h2>");
+ html("<h2>"); xmlput(3); html("</h2>\n");
} else if (buf[0] == '#') {
- html("<h1>"); xmlput(2); html("</h1>");
+ html("<h1>"); xmlput(2); html("</h1>\n");
}
else if (buf[0] == '>') {
html("<p><blockquote>"); xmlput(2);