diff --git a/Makefile b/Makefile deleted file mode 100644 index 82e02c3..0000000 --- a/Makefile +++ /dev/null @@ -1,41 +0,0 @@ -DBG = -g -CC = gcc -WARNFLAGS = -Wall -Wmissing-declarations -Wdeclaration-after-statement -Wcast-align -Winline -Wsign-compare -Wnested-externs -Wpointer-arith -Wformat-security -override CFLAGS += -D_REENTRANT $(shell sdl-config --cflags) $(DBG) $(WARNFLAGS) - -.PHONY: all clean install -all: sdlbomber - -sdlbomber: announce.o bomber.o draw.o game.o gfx.o sound.o list.o network.o menu.o utils.o - gcc $(LDFLAGS) -o $@ $^ $(shell sdl-config --libs) -lavahi-common -lavahi-client $(DBG) - -matcher: matcher.c - -announce.o: announce.c announce.h network.h - -bomber.o: bomber.c announce.h bomber.h draw.h game.h gfx.h list.h menu.h network.h sound.h utils.h - -draw.o: draw.c draw.h bomber.h gfx.h - -game.o: game.c announce.h bomber.h draw.h game.h gfx.h list.h menu.h network.h sound.h utils.h - -gfx.o: gfx.c gfx.h bomber.h - -list.o: list.c bomber.h list.h utils.h - -menu.o: menu.c announce.h bomber.h draw.h game.h gfx.h list.h menu.h network.h sound.h utils.h - -network.o: network.c announce.h bomber.h draw.h game.h menu.h network.h utils.h - -sound.o: sound.c sound.h - -utils.o: utils.c bomber.h utils.h gfx.h - -clean: - rm -f *.o matcher sdlbomber - -install: sdlbomber - echo "Installing into $(DESTDIR)" - mkdir -p "$(DESTDIR)/usr/bin/" "$(DESTDIR)/usr/share/sdlbomber/" - install -m 0755 sdlbomber "$(DESTDIR)/usr/bin/" - install -m 0644 data/*.pcx data/*.raw "$(DESTDIR)/usr/share/sdlbomber/" diff --git a/Makefile.osx b/Makefile.osx deleted file mode 100644 index e29725c..0000000 --- a/Makefile.osx +++ /dev/null @@ -1,26 +0,0 @@ -#DBG += -g -#DBG += -pg -CC = gcc -CFLAGS = -O2 -Wall -I/Library/Frameworks/SDL.framework/Headers $(DBG) - -LDFLAGS += -framework SDL -framework Cocoa -o $@ -lavahi-client - - -all: sdlbomber -sdlbomber: gfx.o bomber.o sound.o SDLMain.o announce.o - - -SDLMain.o: SDLmain.m -bomber.o: bomber.c bomber.h gfx.h sound.h announce.h -gfx.o: gfx.c bomber.h gfx.h -sound.o: sound.c bomber.h sound.h -announce.o: announce.c announce.h - -clean: - rm -f *.o sdlbomber matcher - -test: all - ./sdlbomber - - - diff --git a/Makefile.sdldemoswin32 b/Makefile.sdldemoswin32 deleted file mode 100644 index b158abf..0000000 --- a/Makefile.sdldemoswin32 +++ /dev/null @@ -1,9 +0,0 @@ -# Makefile for bomber -# - -TARGET = sdlbomber -USEINET = true - -include ../GNUmake - -$(TARGET): bomber.o gfx.o sound.o announce.o diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..b7993f0 --- /dev/null +++ b/meson.build @@ -0,0 +1,75 @@ +project( + 'sdlbomber', + 'c', + version: '1.0.10', + default_options: [ + 'warning_level=3', + 'buildtype=debugoptimized', + ], +) + +avahi_client_dep = dependency( + 'avahi-client', +) +sdl_dep = dependency( + 'sdl', +) + +executable( + 'sdlbomber', + 'src/announce.c', + 'src/bomber.c', + 'src/draw.c', + 'src/game.c', + 'src/gfx.c', + 'src/list.c', + # 'src/matcher.c', + 'src/menu.c', + 'src/network.c', + 'src/sound.c', + 'src/utils.c', + # override_options: [ + # 'c_std=c11', + # ], + install: true, + dependencies: [ + avahi_client_dep, + sdl_dep, + ] +) + +install_data( + 'data/bigfont.pcx', + 'data/blocks1.pcx', + 'data/blocks1x.pcx', + 'data/blocks2.pcx', + 'data/blocks2x.pcx', + 'data/blocks3.pcx', + 'data/blocks3x.pcx', + 'data/bomb1.pcx', + 'data/bomb1.raw', + 'data/bomb2.pcx', + 'data/bomb2.raw', + 'data/death.raw', + 'data/death1.pcx', + 'data/death2.pcx', + 'data/death3.pcx', + 'data/drop.raw', + 'data/field0.pcx', + 'data/flames.pcx', + 'data/font.pcx', + 'data/pal0.pcx', + 'data/pal1.pcx', + 'data/pal2.pcx', + 'data/pal3.pcx', + 'data/pal4.pcx', + 'data/pal5.pcx', + 'data/pal6.pcx', + 'data/pal7.pcx', + 'data/pal8.pcx', + 'data/pal9.pcx', + 'data/power1.raw', + 'data/power2.raw', + 'data/tiles.pcx', + 'data/walk.pcx', +) diff --git a/SDLMain.h b/src/SDLMain.h similarity index 100% rename from SDLMain.h rename to src/SDLMain.h diff --git a/announce.c b/src/announce.c similarity index 100% rename from announce.c rename to src/announce.c diff --git a/announce.h b/src/announce.h similarity index 100% rename from announce.h rename to src/announce.h diff --git a/bomber.c b/src/bomber.c similarity index 100% rename from bomber.c rename to src/bomber.c diff --git a/bomber.h b/src/bomber.h similarity index 100% rename from bomber.h rename to src/bomber.h diff --git a/draw.c b/src/draw.c similarity index 100% rename from draw.c rename to src/draw.c diff --git a/draw.h b/src/draw.h similarity index 100% rename from draw.h rename to src/draw.h diff --git a/game.c b/src/game.c similarity index 100% rename from game.c rename to src/game.c diff --git a/game.h b/src/game.h similarity index 100% rename from game.h rename to src/game.h diff --git a/gfx.c b/src/gfx.c similarity index 100% rename from gfx.c rename to src/gfx.c diff --git a/gfx.h b/src/gfx.h similarity index 100% rename from gfx.h rename to src/gfx.h diff --git a/list.c b/src/list.c similarity index 100% rename from list.c rename to src/list.c diff --git a/list.h b/src/list.h similarity index 100% rename from list.h rename to src/list.h diff --git a/matcher.c b/src/matcher.c similarity index 100% rename from matcher.c rename to src/matcher.c diff --git a/menu.c b/src/menu.c similarity index 100% rename from menu.c rename to src/menu.c diff --git a/menu.h b/src/menu.h similarity index 100% rename from menu.h rename to src/menu.h diff --git a/network.c b/src/network.c similarity index 100% rename from network.c rename to src/network.c diff --git a/network.h b/src/network.h similarity index 100% rename from network.h rename to src/network.h diff --git a/sound.c b/src/sound.c similarity index 100% rename from sound.c rename to src/sound.c diff --git a/sound.h b/src/sound.h similarity index 100% rename from sound.h rename to src/sound.h diff --git a/utils.c b/src/utils.c similarity index 100% rename from utils.c rename to src/utils.c diff --git a/utils.h b/src/utils.h similarity index 100% rename from utils.h rename to src/utils.h