Changeset ab65f84 in opengl-game


Ignore:
Timestamp:
Jul 2, 2019, 5:16:02 PM (5 years ago)
Author:
Dmitry Portnoy <dmitry.portnoy@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
b6127d2
Parents:
826df16
Message:

Get the vulkangame makefile target working in both Linux and OSX

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • README.txt

    r826df16 rab65f84  
    4646
    4747
    48 Vulkan Instructions
     48--------------------
     49VULKAN INSTRUCTIOS
    4950--------------------
    5051
     52Windows
     53--------
     54
     55???
     56
    5157Linux:
     58--------
    5259
    53 Download the Vulkan SDK from ...
     60sudo apt-get install libxcb1-dev xorg-dev libsdl2-dev libglm-dev
    5461
    55 -Compile GLFW3 from source
    56  (cmake . && make && sudo make install)
     62Download the vulkan sdk (make sure VULKAN_SDK_PATH in the makefile points to it)
    5763
    58 -sudo apt-get install libxcb1-dev xorg-dev libsdl2-dev libglm-dev
     64make vulkcangame && ./vulkangame
    5965
    6066OSX
     67--------
    6168
    62 Download the vulkan sdk
     69brew install sdl2 (might need 'brew install sdl2 --HEAD')
    6370
    64 Theoretically, installing sdl using "brew install sdl2 --HEAD" should give me the one with VUlkan support
     71Download the vulkan sdk (make sure VULKAN_SDK_PATH in the makefile points to it)
     72
     73make vulkcangame && ./vulkangame
  • makefile

    r826df16 rab65f84  
    22OS = $(shell uname)
    33CC = g++
    4 CFLAGS = -std=c++11 -Wall -pedantic -rdynamic
     4CFLAGS = -std=c++17 -Wall -pedantic -rdynamic
    55# -rdynamic is to generate debug info for dynamic symbols on debian-based
    66# systems (tested on Linux Mint)
     
    3434        $(CC) $^ $(DEP) $(CFLAGS) -o $@
    3535
    36 # from the mac makefile
    37 #CXX_INCLUDES = -I/Users/dportnoy15/Development/vulkan-sdk-macos-1.1.108.0/macOS/include -I/usr/local/Cellar/sdl2/2.0.9_1/include/SDL2
    38 #LIBFLAGS =  -Wl,-rpath,$(VULKAN_SDK_PATH)/macOS/lib $(VULKAN_SDK_PATH)/macOS/lib/libvulkan.dylib -L/usr/local/Cellar/sdl2/2.0.9_1/lib -lSDL2
     36CXX_FLAGS = -std=c++17 -Wall -pedantic # -O3 -rdynamic
    3937
    40 CXX_FLAGS = -std=c++17 -Wall -pedantic # -O3
     38ifeq ($(OS),Darwin)
     39        VULKAN_SDK_PATH = /Users/dportnoy15/Development/vulkan-sdk-macos-1.1.108.0/macOS
     40endif
     41ifeq ($(OS),Linux)
     42        VULKAN_SDK_PATH = /home/dportnoy/Desktop/VulkanSDK/1.1.106.0/x86_64
     43endif
    4144
    42 VULKAN_SDK_PATH = /home/dportnoy/Desktop/VulkanSDK/1.1.106.0/x86_64
     45LIB_PATHS =  -I$(VULKAN_SDK_PATH)/include
     46ifeq ($(OS),Darwin)
     47        LIB_PATHS := -Wl,-rpath,$(VULKAN_SDK_PATH)/lib $(LIB_PATHS)
     48endif
     49ifeq ($(OS),Linux)
     50        LIB_PATHS := -L$(VULKAN_SDK_PATH)/lib $(LIB_PATHS)
     51endif
    4352
    44 LIB_PATHS = -L$(VULKAN_SDK_PATH)/lib -I$(VULKAN_SDK_PATH)/include
    45 LIBS = -lvulkan -lSDL2
     53LIBS = -lSDL2
     54ifeq ($(OS),Darwin)
     55        LIBS := $(VULKAN_SDK_PATH)/lib/libvulkan.dylib $(LIBS)
     56endif
     57ifeq ($(OS),Linux)
     58        LIBS := -lvulkan $(LIBS)
     59endif
    4660
    4761LIB_FLAGS = $(LIB_PATHS) $(LIBS)
Note: See TracChangeset for help on using the changeset viewer.