first commit test
This commit is contained in:
213
raylib.make
Normal file
213
raylib.make
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
# GNU Make project makefile autogenerated by Premake
|
||||||
|
|
||||||
|
ifndef config
|
||||||
|
config=debug_x64
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef verbose
|
||||||
|
SILENT = @
|
||||||
|
endif
|
||||||
|
|
||||||
|
.PHONY: clean prebuild
|
||||||
|
|
||||||
|
SHELLTYPE := posix
|
||||||
|
ifeq ($(shell echo "test"), "test")
|
||||||
|
SHELLTYPE := msdos
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Configurations
|
||||||
|
# #############################################
|
||||||
|
|
||||||
|
ifeq ($(origin CC), default)
|
||||||
|
CC = gcc
|
||||||
|
endif
|
||||||
|
ifeq ($(origin CXX), default)
|
||||||
|
CXX = g++
|
||||||
|
endif
|
||||||
|
ifeq ($(origin AR), default)
|
||||||
|
AR = ar
|
||||||
|
endif
|
||||||
|
RESCOMP = windres
|
||||||
|
INCLUDES += -Ibuild/external/raylib-master/src -Ibuild/external/raylib-master/src/external/glfw/include
|
||||||
|
FORCE_INCLUDE +=
|
||||||
|
ALL_CPPFLAGS += $(CPPFLAGS) -MD -MP $(DEFINES) $(INCLUDES)
|
||||||
|
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||||
|
LIBS +=
|
||||||
|
LDDEPS +=
|
||||||
|
LINKCMD = $(AR) -rcs "$@" $(OBJECTS)
|
||||||
|
define PREBUILDCMDS
|
||||||
|
endef
|
||||||
|
define PRELINKCMDS
|
||||||
|
endef
|
||||||
|
define POSTBUILDCMDS
|
||||||
|
endef
|
||||||
|
|
||||||
|
ifeq ($(config),debug_x64)
|
||||||
|
TARGETDIR = bin/Debug
|
||||||
|
TARGET = $(TARGETDIR)/libraylib.a
|
||||||
|
OBJDIR = obj/x64/Debug/raylib
|
||||||
|
DEFINES += -DDEBUG -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -D_GLFW_X11
|
||||||
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -g
|
||||||
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m64 -g
|
||||||
|
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -m64
|
||||||
|
|
||||||
|
else ifeq ($(config),debug_x86)
|
||||||
|
TARGETDIR = bin/Debug
|
||||||
|
TARGET = $(TARGETDIR)/libraylib.a
|
||||||
|
OBJDIR = obj/x86/Debug/raylib
|
||||||
|
DEFINES += -DDEBUG -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -D_GLFW_X11
|
||||||
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -g
|
||||||
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m32 -g
|
||||||
|
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -m32
|
||||||
|
|
||||||
|
else ifeq ($(config),debug_arm64)
|
||||||
|
TARGETDIR = bin/Debug
|
||||||
|
TARGET = $(TARGETDIR)/libraylib.a
|
||||||
|
OBJDIR = obj/ARM64/Debug/raylib
|
||||||
|
DEFINES += -DDEBUG -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -D_GLFW_X11
|
||||||
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -g
|
||||||
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -g
|
||||||
|
ALL_LDFLAGS += $(LDFLAGS)
|
||||||
|
|
||||||
|
else ifeq ($(config),release_x64)
|
||||||
|
TARGETDIR = bin/Release
|
||||||
|
TARGET = $(TARGETDIR)/libraylib.a
|
||||||
|
OBJDIR = obj/x64/Release/raylib
|
||||||
|
DEFINES += -DNDEBUG -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -D_GLFW_X11
|
||||||
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -O2
|
||||||
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m64 -O2
|
||||||
|
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -m64 -s
|
||||||
|
|
||||||
|
else ifeq ($(config),release_x86)
|
||||||
|
TARGETDIR = bin/Release
|
||||||
|
TARGET = $(TARGETDIR)/libraylib.a
|
||||||
|
OBJDIR = obj/x86/Release/raylib
|
||||||
|
DEFINES += -DNDEBUG -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -D_GLFW_X11
|
||||||
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -O2
|
||||||
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m32 -O2
|
||||||
|
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -m32 -s
|
||||||
|
|
||||||
|
else ifeq ($(config),release_arm64)
|
||||||
|
TARGETDIR = bin/Release
|
||||||
|
TARGET = $(TARGETDIR)/libraylib.a
|
||||||
|
OBJDIR = obj/ARM64/Release/raylib
|
||||||
|
DEFINES += -DNDEBUG -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -D_GLFW_X11
|
||||||
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -O2
|
||||||
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -O2
|
||||||
|
ALL_LDFLAGS += $(LDFLAGS) -s
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Per File Configurations
|
||||||
|
# #############################################
|
||||||
|
|
||||||
|
|
||||||
|
# File sets
|
||||||
|
# #############################################
|
||||||
|
|
||||||
|
GENERATED :=
|
||||||
|
OBJECTS :=
|
||||||
|
|
||||||
|
GENERATED += $(OBJDIR)/raudio.o
|
||||||
|
GENERATED += $(OBJDIR)/rcore.o
|
||||||
|
GENERATED += $(OBJDIR)/rglfw.o
|
||||||
|
GENERATED += $(OBJDIR)/rmodels.o
|
||||||
|
GENERATED += $(OBJDIR)/rshapes.o
|
||||||
|
GENERATED += $(OBJDIR)/rtext.o
|
||||||
|
GENERATED += $(OBJDIR)/rtextures.o
|
||||||
|
OBJECTS += $(OBJDIR)/raudio.o
|
||||||
|
OBJECTS += $(OBJDIR)/rcore.o
|
||||||
|
OBJECTS += $(OBJDIR)/rglfw.o
|
||||||
|
OBJECTS += $(OBJDIR)/rmodels.o
|
||||||
|
OBJECTS += $(OBJDIR)/rshapes.o
|
||||||
|
OBJECTS += $(OBJDIR)/rtext.o
|
||||||
|
OBJECTS += $(OBJDIR)/rtextures.o
|
||||||
|
|
||||||
|
# Rules
|
||||||
|
# #############################################
|
||||||
|
|
||||||
|
all: $(TARGET)
|
||||||
|
@:
|
||||||
|
|
||||||
|
$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR)
|
||||||
|
$(PRELINKCMDS)
|
||||||
|
@echo Linking raylib
|
||||||
|
$(SILENT) $(LINKCMD)
|
||||||
|
$(POSTBUILDCMDS)
|
||||||
|
|
||||||
|
$(TARGETDIR):
|
||||||
|
@echo Creating $(TARGETDIR)
|
||||||
|
ifeq (posix,$(SHELLTYPE))
|
||||||
|
$(SILENT) mkdir -p $(TARGETDIR)
|
||||||
|
else
|
||||||
|
$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
@echo Creating $(OBJDIR)
|
||||||
|
ifeq (posix,$(SHELLTYPE))
|
||||||
|
$(SILENT) mkdir -p $(OBJDIR)
|
||||||
|
else
|
||||||
|
$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
|
||||||
|
endif
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@echo Cleaning raylib
|
||||||
|
ifeq (posix,$(SHELLTYPE))
|
||||||
|
$(SILENT) rm -f $(TARGET)
|
||||||
|
$(SILENT) rm -rf $(GENERATED)
|
||||||
|
$(SILENT) rm -rf $(OBJDIR)
|
||||||
|
else
|
||||||
|
$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
|
||||||
|
$(SILENT) if exist $(subst /,\\,$(GENERATED)) del /s /q $(subst /,\\,$(GENERATED))
|
||||||
|
$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
|
||||||
|
endif
|
||||||
|
|
||||||
|
prebuild: | $(OBJDIR)
|
||||||
|
$(PREBUILDCMDS)
|
||||||
|
|
||||||
|
ifneq (,$(PCH))
|
||||||
|
$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER)
|
||||||
|
$(GCH): $(PCH) | prebuild
|
||||||
|
@echo $(notdir $<)
|
||||||
|
$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
|
||||||
|
$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR)
|
||||||
|
ifeq (posix,$(SHELLTYPE))
|
||||||
|
$(SILENT) touch "$@"
|
||||||
|
else
|
||||||
|
$(SILENT) echo $null >> "$@"
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
$(OBJECTS): | prebuild
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
# File Rules
|
||||||
|
# #############################################
|
||||||
|
|
||||||
|
$(OBJDIR)/raudio.o: build/external/raylib-master/src/raudio.c
|
||||||
|
@echo "$(notdir $<)"
|
||||||
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
||||||
|
$(OBJDIR)/rcore.o: build/external/raylib-master/src/rcore.c
|
||||||
|
@echo "$(notdir $<)"
|
||||||
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
||||||
|
$(OBJDIR)/rglfw.o: build/external/raylib-master/src/rglfw.c
|
||||||
|
@echo "$(notdir $<)"
|
||||||
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
||||||
|
$(OBJDIR)/rmodels.o: build/external/raylib-master/src/rmodels.c
|
||||||
|
@echo "$(notdir $<)"
|
||||||
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
||||||
|
$(OBJDIR)/rshapes.o: build/external/raylib-master/src/rshapes.c
|
||||||
|
@echo "$(notdir $<)"
|
||||||
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
||||||
|
$(OBJDIR)/rtext.o: build/external/raylib-master/src/rtext.c
|
||||||
|
@echo "$(notdir $<)"
|
||||||
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
||||||
|
$(OBJDIR)/rtextures.o: build/external/raylib-master/src/rtextures.c
|
||||||
|
@echo "$(notdir $<)"
|
||||||
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
||||||
|
|
||||||
|
-include $(OBJECTS:%.o=%.d)
|
||||||
|
ifneq (,$(PCH))
|
||||||
|
-include $(PCH_PLACEHOLDER).d
|
||||||
|
endif
|
||||||
BIN
resources/emi.jpg
Normal file
BIN
resources/emi.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
BIN
resources/emi.png
Normal file
BIN
resources/emi.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 233 KiB |
19
src/main.c
19
src/main.c
@@ -17,13 +17,17 @@ int main ()
|
|||||||
SetConfigFlags(FLAG_VSYNC_HINT | FLAG_WINDOW_HIGHDPI);
|
SetConfigFlags(FLAG_VSYNC_HINT | FLAG_WINDOW_HIGHDPI);
|
||||||
|
|
||||||
// Create the window and OpenGL context
|
// Create the window and OpenGL context
|
||||||
InitWindow(800, 600, "Hello Raylib");
|
InitWindow(800, 600, "Hello Emi");
|
||||||
|
|
||||||
// Utility function from resource_dir.h to find the resources folder and set it as the current working directory so we can load from it
|
// Utility function from resource_dir.h to find the resources folder and set it as the current working directory so we can load from it
|
||||||
SearchAndSetResourceDir("resources");
|
SearchAndSetResourceDir("resources");
|
||||||
|
|
||||||
// Load a texture from the resources directory
|
// Load a texture from the resources directory
|
||||||
Texture wabbit = LoadTexture("wabbit_alpha.png");
|
Image image = LoadImage("emi.png");
|
||||||
|
Texture2D emi = LoadTextureFromImage(image);
|
||||||
|
UnloadImage(image);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// game loop
|
// game loop
|
||||||
while (!WindowShouldClose()) // run the loop until the user presses ESCAPE or presses the Close button on the window
|
while (!WindowShouldClose()) // run the loop until the user presses ESCAPE or presses the Close button on the window
|
||||||
@@ -34,11 +38,12 @@ int main ()
|
|||||||
// Setup the back buffer for drawing (clear color and depth buffers)
|
// Setup the back buffer for drawing (clear color and depth buffers)
|
||||||
ClearBackground(BLACK);
|
ClearBackground(BLACK);
|
||||||
|
|
||||||
// draw some text using the default font
|
|
||||||
DrawText("Hello Raylib", 200,200,20,WHITE);
|
|
||||||
|
|
||||||
// draw our texture to the screen
|
// draw our texture to the screen
|
||||||
DrawTexture(wabbit, 400, 200, WHITE);
|
DrawTexture(emi, 800/2 - emi.width/2, 600/2 - emi.height/2, WHITE);
|
||||||
|
|
||||||
|
// draw some text using the default font
|
||||||
|
DrawText("Emi la plus belle", 200,50,20,PINK);
|
||||||
|
|
||||||
|
|
||||||
// end the frame and get ready for the next one (display frame, poll input, etc...)
|
// end the frame and get ready for the next one (display frame, poll input, etc...)
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
@@ -46,7 +51,7 @@ int main ()
|
|||||||
|
|
||||||
// cleanup
|
// cleanup
|
||||||
// unload our texture so it can be cleaned up
|
// unload our texture so it can be cleaned up
|
||||||
UnloadTexture(wabbit);
|
UnloadTexture(emi);
|
||||||
|
|
||||||
// destroy the window and cleanup the OpenGL context
|
// destroy the window and cleanup the OpenGL context
|
||||||
CloseWindow();
|
CloseWindow();
|
||||||
|
|||||||
193
test-text.make
Normal file
193
test-text.make
Normal file
@@ -0,0 +1,193 @@
|
|||||||
|
# GNU Make project makefile autogenerated by Premake
|
||||||
|
|
||||||
|
ifndef config
|
||||||
|
config=debug_x64
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifndef verbose
|
||||||
|
SILENT = @
|
||||||
|
endif
|
||||||
|
|
||||||
|
.PHONY: clean prebuild
|
||||||
|
|
||||||
|
SHELLTYPE := posix
|
||||||
|
ifeq ($(shell echo "test"), "test")
|
||||||
|
SHELLTYPE := msdos
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Configurations
|
||||||
|
# #############################################
|
||||||
|
|
||||||
|
ifeq ($(origin CC), default)
|
||||||
|
CC = gcc
|
||||||
|
endif
|
||||||
|
ifeq ($(origin CXX), default)
|
||||||
|
CXX = g++
|
||||||
|
endif
|
||||||
|
ifeq ($(origin AR), default)
|
||||||
|
AR = ar
|
||||||
|
endif
|
||||||
|
RESCOMP = windres
|
||||||
|
INCLUDES += -Isrc -Iinclude -Ibuild/external/raylib-master/src
|
||||||
|
FORCE_INCLUDE +=
|
||||||
|
ALL_CPPFLAGS += $(CPPFLAGS) -MD -MP $(DEFINES) $(INCLUDES)
|
||||||
|
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||||
|
LINKCMD = $(CXX) -o "$@" $(OBJECTS) $(RESOURCES) $(ALL_LDFLAGS) $(LIBS)
|
||||||
|
define PREBUILDCMDS
|
||||||
|
endef
|
||||||
|
define PRELINKCMDS
|
||||||
|
endef
|
||||||
|
define POSTBUILDCMDS
|
||||||
|
endef
|
||||||
|
|
||||||
|
ifeq ($(config),debug_x64)
|
||||||
|
TARGETDIR = bin/Debug
|
||||||
|
TARGET = $(TARGETDIR)/test-text
|
||||||
|
OBJDIR = obj/x64/Debug/test-text
|
||||||
|
DEFINES += -DDEBUG -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -D_GLFW_X11
|
||||||
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -Wshadow -g -std=c17
|
||||||
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m64 -Wshadow -g -std=c++17
|
||||||
|
LIBS += bin/Debug/libraylib.a -lpthread -lm -ldl -lrt -lX11
|
||||||
|
LDDEPS += bin/Debug/libraylib.a
|
||||||
|
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -m64
|
||||||
|
|
||||||
|
else ifeq ($(config),debug_x86)
|
||||||
|
TARGETDIR = bin/Debug
|
||||||
|
TARGET = $(TARGETDIR)/test-text
|
||||||
|
OBJDIR = obj/x86/Debug/test-text
|
||||||
|
DEFINES += -DDEBUG -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -D_GLFW_X11
|
||||||
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -Wshadow -g -std=c17
|
||||||
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m32 -Wshadow -g -std=c++17
|
||||||
|
LIBS += bin/Debug/libraylib.a -lpthread -lm -ldl -lrt -lX11
|
||||||
|
LDDEPS += bin/Debug/libraylib.a
|
||||||
|
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -m32
|
||||||
|
|
||||||
|
else ifeq ($(config),debug_arm64)
|
||||||
|
TARGETDIR = bin/Debug
|
||||||
|
TARGET = $(TARGETDIR)/test-text
|
||||||
|
OBJDIR = obj/ARM64/Debug/test-text
|
||||||
|
DEFINES += -DDEBUG -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -D_GLFW_X11
|
||||||
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wshadow -g -std=c17
|
||||||
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -Wshadow -g -std=c++17
|
||||||
|
LIBS += bin/Debug/libraylib.a -lpthread -lm -ldl -lrt -lX11
|
||||||
|
LDDEPS += bin/Debug/libraylib.a
|
||||||
|
ALL_LDFLAGS += $(LDFLAGS)
|
||||||
|
|
||||||
|
else ifeq ($(config),release_x64)
|
||||||
|
TARGETDIR = bin/Release
|
||||||
|
TARGET = $(TARGETDIR)/test-text
|
||||||
|
OBJDIR = obj/x64/Release/test-text
|
||||||
|
DEFINES += -DNDEBUG -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -D_GLFW_X11
|
||||||
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m64 -Wshadow -O2 -std=c17
|
||||||
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m64 -Wshadow -O2 -std=c++17
|
||||||
|
LIBS += bin/Release/libraylib.a -lpthread -lm -ldl -lrt -lX11
|
||||||
|
LDDEPS += bin/Release/libraylib.a
|
||||||
|
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib64 -m64 -s
|
||||||
|
|
||||||
|
else ifeq ($(config),release_x86)
|
||||||
|
TARGETDIR = bin/Release
|
||||||
|
TARGET = $(TARGETDIR)/test-text
|
||||||
|
OBJDIR = obj/x86/Release/test-text
|
||||||
|
DEFINES += -DNDEBUG -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -D_GLFW_X11
|
||||||
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -m32 -Wshadow -O2 -std=c17
|
||||||
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -m32 -Wshadow -O2 -std=c++17
|
||||||
|
LIBS += bin/Release/libraylib.a -lpthread -lm -ldl -lrt -lX11
|
||||||
|
LDDEPS += bin/Release/libraylib.a
|
||||||
|
ALL_LDFLAGS += $(LDFLAGS) -L/usr/lib32 -m32 -s
|
||||||
|
|
||||||
|
else ifeq ($(config),release_arm64)
|
||||||
|
TARGETDIR = bin/Release
|
||||||
|
TARGET = $(TARGETDIR)/test-text
|
||||||
|
OBJDIR = obj/ARM64/Release/test-text
|
||||||
|
DEFINES += -DNDEBUG -DPLATFORM_DESKTOP -DGRAPHICS_API_OPENGL_33 -D_GLFW_X11
|
||||||
|
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) -Wshadow -O2 -std=c17
|
||||||
|
ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CPPFLAGS) -Wshadow -O2 -std=c++17
|
||||||
|
LIBS += bin/Release/libraylib.a -lpthread -lm -ldl -lrt -lX11
|
||||||
|
LDDEPS += bin/Release/libraylib.a
|
||||||
|
ALL_LDFLAGS += $(LDFLAGS) -s
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Per File Configurations
|
||||||
|
# #############################################
|
||||||
|
|
||||||
|
|
||||||
|
# File sets
|
||||||
|
# #############################################
|
||||||
|
|
||||||
|
GENERATED :=
|
||||||
|
OBJECTS :=
|
||||||
|
|
||||||
|
GENERATED += $(OBJDIR)/main.o
|
||||||
|
OBJECTS += $(OBJDIR)/main.o
|
||||||
|
|
||||||
|
# Rules
|
||||||
|
# #############################################
|
||||||
|
|
||||||
|
all: $(TARGET)
|
||||||
|
@:
|
||||||
|
|
||||||
|
$(TARGET): $(GENERATED) $(OBJECTS) $(LDDEPS) | $(TARGETDIR)
|
||||||
|
$(PRELINKCMDS)
|
||||||
|
@echo Linking test-text
|
||||||
|
$(SILENT) $(LINKCMD)
|
||||||
|
$(POSTBUILDCMDS)
|
||||||
|
|
||||||
|
$(TARGETDIR):
|
||||||
|
@echo Creating $(TARGETDIR)
|
||||||
|
ifeq (posix,$(SHELLTYPE))
|
||||||
|
$(SILENT) mkdir -p $(TARGETDIR)
|
||||||
|
else
|
||||||
|
$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
|
||||||
|
endif
|
||||||
|
|
||||||
|
$(OBJDIR):
|
||||||
|
@echo Creating $(OBJDIR)
|
||||||
|
ifeq (posix,$(SHELLTYPE))
|
||||||
|
$(SILENT) mkdir -p $(OBJDIR)
|
||||||
|
else
|
||||||
|
$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
|
||||||
|
endif
|
||||||
|
|
||||||
|
clean:
|
||||||
|
@echo Cleaning test-text
|
||||||
|
ifeq (posix,$(SHELLTYPE))
|
||||||
|
$(SILENT) rm -f $(TARGET)
|
||||||
|
$(SILENT) rm -rf $(GENERATED)
|
||||||
|
$(SILENT) rm -rf $(OBJDIR)
|
||||||
|
else
|
||||||
|
$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
|
||||||
|
$(SILENT) if exist $(subst /,\\,$(GENERATED)) del /s /q $(subst /,\\,$(GENERATED))
|
||||||
|
$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
|
||||||
|
endif
|
||||||
|
|
||||||
|
prebuild: | $(OBJDIR)
|
||||||
|
$(PREBUILDCMDS)
|
||||||
|
|
||||||
|
ifneq (,$(PCH))
|
||||||
|
$(OBJECTS): $(GCH) | $(PCH_PLACEHOLDER)
|
||||||
|
$(GCH): $(PCH) | prebuild
|
||||||
|
@echo $(notdir $<)
|
||||||
|
$(SILENT) $(CXX) -x c++-header $(ALL_CXXFLAGS) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
|
||||||
|
$(PCH_PLACEHOLDER): $(GCH) | $(OBJDIR)
|
||||||
|
ifeq (posix,$(SHELLTYPE))
|
||||||
|
$(SILENT) touch "$@"
|
||||||
|
else
|
||||||
|
$(SILENT) echo $null >> "$@"
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
$(OBJECTS): | prebuild
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
# File Rules
|
||||||
|
# #############################################
|
||||||
|
|
||||||
|
$(OBJDIR)/main.o: src/main.c
|
||||||
|
@echo "$(notdir $<)"
|
||||||
|
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<"
|
||||||
|
|
||||||
|
-include $(OBJECTS:%.o=%.d)
|
||||||
|
ifneq (,$(PCH))
|
||||||
|
-include $(PCH_PLACEHOLDER).d
|
||||||
|
endif
|
||||||
Reference in New Issue
Block a user