| 1 |
LDFLAGS+=-lpthread |
| 2 |
FLAGS=-I../.. |
| 3 |
#FLAGS+=-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error |
| 4 |
FLAGS+=-Wall -DMICROPROFILE_GPU_TIMERS=0 |
| 5 |
FLAGS+=-g -O0 -Wno-invalid-offsetof -Wall -Werror |
| 6 |
#FLAGS+=-DMICROPROFILE_ENABLED=0 |
| 7 |
|
| 8 |
CPPFLAGS= $(FLAGS) -std=c++14 |
| 9 |
CFLAGS = $(FLAGS) -std=c99 |
| 10 |
|
| 11 |
CPPFLAGS+=-Wno-unused-variable |
| 12 |
|
| 13 |
|
| 14 |
CPP_SOURCES = fakework.cpp noframes.cpp ../../microprofile.cpp |
| 15 |
C_SOURCES = |
| 16 |
|
| 17 |
TARGET=noframes |
| 18 |
CC = clang |
| 19 |
CXX = clang++ |
| 20 |
LD = $(CXX) |
| 21 |
|
| 22 |
CPP_OBJS = $(patsubst %.cpp,%.o,$(CPP_SOURCES)) |
| 23 |
C_OBJS = $(patsubst %.c,%.o,$(C_SOURCES)) |
| 24 |
|
| 25 |
all: $(TARGET) |
| 26 |
|
| 27 |
$(TARGET): $(C_OBJS) $(CPP_OBJS) |
| 28 |
$(LD) -o $(TARGET) $(C_OBJS) $(CPP_OBJS) $(LDFLAGS) $(CPPFLAGS) |
| 29 |
|
| 30 |
-include .depend |
| 31 |
|
| 32 |
.cpp.o: |
| 33 |
$(CXX) -c $< $(CPPFLAGS) -o $@ |
| 34 |
|
| 35 |
.c.o: |
| 36 |
$(CC) -c $< $(CFLAGS) -o $@ |
| 37 |
|
| 38 |
|
| 39 |
clean: depend |
| 40 |
rm -f *.o ../../microprofile.o $(TARGET) |
| 41 |
|
| 42 |
depend: $(CPP_SOURCES) $(C_SOURCES) |
| 43 |
$(CXX) -MM $(CPPFLAGS) $(CPP_SOURCES) >> .depend |
| 44 |
|
| 45 |
embed_target: |
| 46 |
cd ../../src && make |
| 47 |
|
| 48 |
embed: embed_target all |
| 49 |
|
| 50 |
|