Further makefile cleanup, added profyler

This commit is contained in:
George Sokianos 2022-09-26 15:30:42 +01:00
parent f053ecde04
commit da2ba3aac2
2 changed files with 16 additions and 10 deletions

View File

@ -17,18 +17,23 @@ cxxcompiler := g++
INCPATH := -Isrc -Ilib/dmon -I/sdk/local/newlib/include/SDL2 \
-I/sdk/local/common/include/lua52 -I/sdk/local/common/include/freetype2
DFLAGS := -D__USE_INLINE__ -DLITE_XL_DATA_USE_EXEDIR
# -DLITE_USE_SDL_RENDERER
# -Wextra -Wall
DFLAGS += -D__USE_INLINE__ -DLITE_XL_DATA_USE_EXEDIR
CFLAGS := -Werror -Wwrite-strings -O2 -g -gstabs -std=gnu11 -fno-strict-aliasing
# "-gstabs -finstrument-functions -fno-inline -DPROFILING"
CFLAGS += -Werror -Wwrite-strings -O2 -g -std=gnu11 -fno-strict-aliasing
LFLAGS := -mcrt=newlib -static-libgcc -static-libstdc++ -lauto \
-lpcre2 -lSDL2 -llua52 -lagg -lfreetype -lz -lm \
-lpthread -athread=native -gstabs
# -lprofyle
LFLAGS += -mcrt=newlib -lauto \
-lpcre2 -lSDL2 -llua52 -lfreetype -lz -lm -lpthread -athread=native
ifeq ($(DEBUG),1)
CFLAGS += -gstabs
LFLAGS += -gstabs
ifeq ($(PROFYLER),1)
CFLAGS += -finstrument-functions -fno-inline -DPROFILING
LFLAGS += -lprofyle
endif
endif
.PHONY: LiteXL clean release
@ -46,7 +51,7 @@ LiteXL: $(LiteXL_OBJ)
.c.o:
@echo "Compiling $<"
@$(compiler) -c $< -o $*.o $(CFLAGS) $(INCPATH) $(DFLAGS)
$(compiler) -c $< -o $*.o $(CFLAGS) $(INCPATH) $(DFLAGS)
src/dirmonitor.o: src/dirmonitor.c src/platform/amigaos4.h

View File

@ -2,6 +2,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <profyle.h>
#include "amigaos4.h"