summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2019-09-25 19:17:09 +0100
committerFreeArtMan <dos21h@gmail.com>2019-09-25 19:17:09 +0100
commit3e187c094f12ef41ea6de2f55d128c3e037b5c12 (patch)
treef0dbbc5df260532e284ca5264297d0a8044eaeb4 /Makefile
parentbbd73385a0db271b457c63e4d6bab54f581410f9 (diff)
downloadihe-3e187c094f12ef41ea6de2f55d128c3e037b5c12.tar.gz
ihe-3e187c094f12ef41ea6de2f55d128c3e037b5c12.zip
Untested version, recompiled with new buf library and with c+
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 8 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index bef2096..fa76dcd 100644
--- a/Makefile
+++ b/Makefile
@@ -1,25 +1,27 @@
PROJECT=ihe
CC=gcc
-CFLAGS=-I./
-SOURCES=buf.c core.c
+CPP=g++
+CFLAGS=-I./ -I./libbuf -Wwrite-strings -fpermissive -fno-rtti -fno-exceptions -fno-unwind-tables
+SOURCES=core.c
SOURCES+=$(wildcard cmd/*.c)
OBJECTS=$(SOURCES:.c=.o)
-LIB_OBJECTS=libcmd/libcmd.o libterm/libterm.o h64e/core.o
+LIB_OBJECTS=libcmd/libcmd.o libterm/libterm.o h64e/core.o libbuf/libbuf.o
all: clean $(OBJECTS) $(PROJECT)
$(PROJECT):
- $(CC) -c $(PROJECT).c
+ $(CPP) -c $(PROJECT).c
ld -r $(OBJECTS) $(PROJECT).o -o $(PROJECT)_.o
- $(CC) $(CFLAGS) $(PROJECT)_.o $(LIB_OBJECTS) -o $(PROJECT)
+ $(CPP) $(CFLAGS) $(PROJECT)_.o $(LIB_OBJECTS) -o $(PROJECT)
%.o: %.c
- $(CC) $(CFLAGS) -c $< -o $@
+ $(CPP) $(CFLAGS) -c $< -o $@
clean:
rm -f $(PROJECT)
rm -f *.o
+ rm -f cmd/*.o
leak:
valgrind --leak-check=full --track-origins=yes --log-file=log.txt ./ihe