Skip to content

Commit aa27938

Browse files
make GPU use libepoxy
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
1 parent bf194ec commit aa27938

12 files changed

+76
-32846
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/subprojects/*
2+
!/subprojects/*.wrap
13
*.exe
24
build/*
35
build/

Makefile

-57
This file was deleted.

meson.build

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
project('comet', 'c', default_options: 'default_library=static')
2+
3+
comet_sources = [
4+
'src/comet.c',
5+
'src/cpu.c',
6+
'src/decode.c',
7+
'src/dev.c',
8+
'src/ic.c',
9+
'src/io.c',
10+
'src/mmu.c',
11+
'src/gpu/gpu.c',
12+
'src/gpu/gpu.h',
13+
]
14+
15+
cc = meson.get_compiler('c')
16+
17+
sdl2_dep = dependency('sdl2')
18+
sdl2_image_dep = dependency('SDL2_image')
19+
sdl2_main_dep = cc.find_library('SDL2main')
20+
epoxy_dep = dependency('epoxy')
21+
m_dep = cc.find_library('m')
22+
23+
comet_deps = [sdl2_dep, sdl2_image_dep, sdl2_main_dep, epoxy_dep, m_dep]
24+
25+
if host_machine.system() == 'windows'
26+
ws2_32_dep = cc.find_library('ws2_32')
27+
comet_deps += ws2_32_dep
28+
endif
29+
30+
executable(
31+
'comet',
32+
comet_sources,
33+
dependencies: comet_deps,
34+
win_subsystem: 'windows',
35+
install: true
36+
)

0 commit comments

Comments
 (0)