ASFLAGS = -felf
CPPFLAGS = -I$(ACESSUSERDIR)/include/ -DARCHDIR_is_$(ARCHDIR)
CFLAGS = -fno-stack-protector $(CPPFLAGS)
-LDFLAGS = -T $(OUTPUTDIR)Libs/acess.ld -rpath-link $(OUTPUTDIR)Libs -L $(OUTPUTDIR)Libs -I /Acess/Libs/ld-acess.so -lld-acess -lc
+LDFLAGS = -T $(OUTPUTDIR)Libs/acess.ld -rpath-link $(OUTPUTDIR)Libs -L $(OUTPUTDIR)Libs -I /Acess/Libs/ld-acess.so -lld-acess -lc $(OUTPUTDIR)Libs/crtbegin.o $(OUTPUTDIR)Libs/crtend.o
# Extra-verbose errors!
#CFLAGS += -Wall -Wextra -Wwrite-strings -Wshadow -Wswitch-default -Wswitch-enum -Wstrict-overflow=5 -Wfloat-equal -Wundef -Wmissing-declarations -Wlogical-op
$(OBJ): $(_OBJPREFIX)%.o: %.c
@echo [CC] -o $@
ifneq ($(_OBJPREFIX),)
- @mkdir -p $(_OBJPREFIX)
+ @mkdir -p $(dir $@)
endif
@$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
@$(CC) -M -MT $@ $(CPPFLAGS) $< -o $(_OBJPREFIX)$*.dep