blob: 5f6e0f0a7cce8e94b03adc4b389d63400f0e5357 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
PROJECT=ihe
CC=gcc
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 libbuf/libbuf.o
all: clean $(OBJECTS) $(PROJECT)
$(PROJECT):
$(CPP) $(CFALGS) -c $(PROJECT).c
ld -r $(OBJECTS) $(PROJECT).o -o $(PROJECT)_.o
$(CPP) $(CFLAGS) $(PROJECT)_.o $(LIB_OBJECTS) -o $(PROJECT)
%.o: %.c
$(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
|