diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ds.mk | 4 | ||||
| -rw-r--r-- | src/makefile | 3 | ||||
| -rw-r--r-- | src/ppusim/work.c | 5 | ||||
| -rw-r--r-- | src/ppusim/work.h | 1 | ||||
| -rw-r--r-- | src/stm32.mk | 3 | 
5 files changed, 15 insertions, 1 deletions
@@ -3,6 +3,10 @@ LD := gcc  LFLAGS += -lSDL2 +ifeq ($(HOST),Msys) +SHARED_FLAGS += -I/mingw64/include +endif +  DESKTOP_SRCS += ppusim/sim.c \  								ppusim/mem.c \  								ppusim/pixel.c \ diff --git a/src/makefile b/src/makefile index 1f1dc65..1115874 100644 --- a/src/makefile +++ b/src/makefile @@ -4,6 +4,7 @@ TARGET = main  # platform is ds (desktop) or stm (stm32)  PLATFORM = ds +# if your editor uses compile_commands.json for autocomplete, you should run `make compile_commands.json` again  HOST=$(strip $(shell uname -o)) @@ -74,7 +75,7 @@ flash: $(TARGET).bin  $(TARGET): $(OBJS)  	$(LD) $^ $(LFLAGS) -o $@ -compile_commands.json: +compile_commands.json: makefile stm32.mk ds.mk  	compiledb make -Bn  	../scripts/compiledb-full-path-mingw.sh compile_commands.json diff --git a/src/ppusim/work.c b/src/ppusim/work.c index fcb80ca..3b9cee6 100644 --- a/src/ppusim/work.c +++ b/src/ppusim/work.c @@ -11,6 +11,10 @@ pthread_t* g_hh_ppusim_threads;  unsigned g_hh_ppusim_core_count;  hh_s_ppusim_screen g_hh_ppusim_screen; +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wint-to-pointer-cast" +#pragma GCC diagnostic ignored "-Wpointer-to-int-cast" +  void* hh_ppusim_draw_thread(void* arg) {  	unsigned core = (unsigned long) arg;  	for (unsigned y = core; y < HH_PPU_SCREEN_HEIGHT; y += g_hh_ppusim_core_count) @@ -38,3 +42,4 @@ void hh_ppusim_draw_frame(SDL_Renderer* renderer) {  	}  } +#pragma GCC diagnostic pop diff --git a/src/ppusim/work.h b/src/ppusim/work.h index 6f72357..3a165ff 100644 --- a/src/ppusim/work.h +++ b/src/ppusim/work.h @@ -1,6 +1,7 @@  #pragma once  #include <SDL2/SDL.h> +#include <pthread.h>  #include "ppu/consts.h" diff --git a/src/stm32.mk b/src/stm32.mk index e41bcf9..6926dea 100644 --- a/src/stm32.mk +++ b/src/stm32.mk @@ -17,6 +17,9 @@ SHARED_FLAGS += -I./stm32  ifeq ($(HOST),GNU/Linux)  SHARED_FLAGS += -I/usr/arm-none-eabi/include/  endif +ifeq ($(HOST),Msys) +SHARED_FLAGS += -I/mingw64/arm-none-eabi/include/ +endif  SHARED_FLAGS += -ffunction-sections  SHARED_FLAGS += -fdata-sections  SHARED_FLAGS += -Wl,--gc-sections  |