lite/Makefile

106 lines
2.3 KiB
Makefile
Raw Permalink Normal View History

#
# Makefile generated by:
# codebench 0.55
#
# Project: lite
#
2021-12-19 23:24:44 +01:00
# Created on: 15-12-2021 22:58:23
#
#
###################################################################
##
##//// Objects
##
###################################################################
lite_OBJ := \
src/lib/stb/stb_truetype.o src/api/renderer.o src/api/renderer_font.o \
src/api/system.o src/main.o src/api/api.o \
src/rencache.o src/renderer.o
###################################################################
##
##//// Variables and Environment
##
###################################################################
CC := gcc:bin/gcc
2021-12-19 23:24:44 +01:00
INCPATH := -I. -Isrc
2021-12-19 23:24:44 +01:00
CFLAGS := $(INCPATH) -D__USE_INLINE__ -Wall -Werror -Wwrite-strings
###################################################################
##
##//// General rules
##
###################################################################
.PHONY: all all-before all-after clean clean-custom realclean
all: all-before lite all-after
all-before:
# You can add rules here to execute before the project is built
all-after:
# You can add rules here to execute after the project is built
clean: clean-custom
@echo "Cleaning compiler objects..."
@rm -f $(lite_OBJ)
realclean:
@echo "Cleaning compiler objects and targets..."
@rm -f $(lite_OBJ) lite
###################################################################
##
##//// Targets
##
###################################################################
lite: $(lite_OBJ)
@echo "Linking lite"
2021-12-19 23:24:44 +01:00
@gcc:bin/gcc -o lite $(lite_OBJ) -llua -lSDL2 -lpthread -lauto
@echo "Removing stale debug target: lite"
@rm -f lite.debug
###################################################################
##
##//// Standard rules
##
###################################################################
# A default rule to make all the objects listed below
# because we are hiding compiler commands from the output
.c.o:
@echo "Compiling $<"
@$(CC) -c $< -o $*.o $(CFLAGS)
src/api/api.o: src/api/api.c
2021-12-19 23:24:44 +01:00
src/api/renderer.o: src/api/renderer.c src/api/api.h src/renderer.h \
2021-12-19 23:24:44 +01:00
src/api/renderer_font.o: src/api/renderer_font.c src/api/api.h src/renderer.h \
2021-12-19 23:24:44 +01:00
src/api/system.o: src/api/system.c src/api/api.h
src/main.o: src/main.c src/api/api.h src/renderer.h \
2021-12-19 23:24:44 +01:00
src/rencache.o: src/rencache.c
src/renderer.o: src/renderer.c src/lib/stb/stb_truetype.h
src/lib/stb/stb_truetype.o: src/lib/stb/stb_truetype.c