Skip to content

Commit

Permalink
make GPU use libepoxy
Browse files Browse the repository at this point in the history
glew is old and has many issues that prevent it from running on modern systems
also port to meson because i'm not touching makefile hell
  • Loading branch information
pontaoski committed Mar 24, 2024
1 parent bf194ec commit 32465cd
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 32,842 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/subprojects/*
!/subprojects/*.wrap
*.exe
build/*
build/
Expand Down
57 changes: 0 additions & 57 deletions Makefile

This file was deleted.

37 changes: 37 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
project('comet', 'c', default_options: 'default_library=static')

comet_sources = [
'src/comet.c',
'src/cpu.c',
'src/decode.c',
'src/dev.c',
'src/ic.c',
'src/io.c',
'src/mmu.c',
'src/gpu/gpu.c',
'src/gpu/gpu.h',
]

cc = meson.get_compiler('c')

sdl2_dep = dependency('sdl2')
sdl2_image_dep = dependency('SDL2_image')
epoxy_dep = dependency('epoxy')
m_dep = cc.find_library('m')

if host_machine.system() == 'windows'
sdl2_main_dep = cc.find_library('SDL2main')
ws2_32_dep = cc.find_library('ws2_32')

comet_deps = [sdl2_dep, sdl2_image_dep, sdl2_main_dep, epoxy_dep, m_dep, ws2_32_dep]
else
comet_deps = [sdl2_dep, sdl2_image_dep, epoxy_dep, m_dep]
endif

executable(
'comet',
comet_sources,
dependencies: comet_deps,
win_subsystem: 'windows',
install: true
)
Loading

0 comments on commit 32465cd

Please sign in to comment.