add SDL support, fix Musashi build

Sun, 28 Nov 2010 03:03:34 +0000

author
Philip Pemberton <philpem@philpem.me.uk>
date
Sun, 28 Nov 2010 03:03:34 +0000
changeset 3
916a2c764bde
parent 2
566a09ee4068
child 4
21a7b07b6310

add SDL support, fix Musashi build

Makefile file | annotate | diff | revisions
     1.1 --- a/Makefile	Sat Nov 27 11:30:19 2010 +0000
     1.2 +++ b/Makefile	Sun Nov 28 03:03:34 2010 +0000
     1.3 @@ -115,7 +115,7 @@
     1.4  TARGET		=	3b1emu
     1.5  
     1.6  # source files that produce object files
     1.7 -SRC			=	main.c musashi/m68kcpu.c musashi/m68kops.c
     1.8 +SRC			=	main.c musashi/m68kcpu.c musashi/m68kops.c musashi/m68kopac.c musashi/m68kopdm.c musashi/m68kopnz.c
     1.9  
    1.10  # source type - either "c" or "cpp" (C or C++)
    1.11  SRC_TYPE	=	c
    1.12 @@ -124,12 +124,12 @@
    1.13  EXT_OBJ		=
    1.14  # libraries to link in -- these will be specified as "-l" parameters, the -l
    1.15  # is prepended automatically
    1.16 -LIB			=	sdl
    1.17 +LIB			=
    1.18  # library paths -- where to search for the above libraries
    1.19 -LIBPATH		=	musashi
    1.20 +LIBPATH		=
    1.21  # include paths -- where to search for #include files (in addition to the
    1.22  # standard paths
    1.23 -INCPATH		=	musashi
    1.24 +INCPATH		=
    1.25  # garbage files that should be deleted on a 'make clean' or 'make tidy'
    1.26  GARBAGE		=	obj/musashi/m68kmake obj/musashi/m68kmake.exe obj/musashi/m68kmake.o
    1.27  
    1.28 @@ -143,6 +143,8 @@
    1.29  ENABLE_WX	=	no
    1.30  # wxWidgets: list of wxWidgets libraries to enable
    1.31  WX_LIBS		=	std
    1.32 +# SDL: set to "yes" to enable, anything else to disable
    1.33 +ENABLE_SDL	=	yes
    1.34  
    1.35  ####
    1.36  # Win32 target-specific settings
    1.37 @@ -273,6 +275,15 @@
    1.38  endif
    1.39  
    1.40  ####
    1.41 +# SDL support
    1.42 +####
    1.43 +ifeq ($(ENABLE_SDL),yes)
    1.44 +	LIBLNK		+=	`sdl-config --libs`
    1.45 +	CFLAGS		+=	`sdl-config --cflags`
    1.46 +endif
    1.47 +
    1.48 +
    1.49 +####
    1.50  # rules
    1.51  ####
    1.52  
    1.53 @@ -400,7 +411,7 @@
    1.54  obj/musashi/m68kmake:	obj/musashi/m68kmake.o
    1.55  	$(CC) $(CFLAGS) $(CPPFLAGS) obj/musashi/m68kmake.o -o $@
    1.56  # 68k CPU sources
    1.57 -src/musashi/m68kops.h src/musashi/m68kops.c:	obj/musashi/m68kmake src/musashi/m68k_in.c
    1.58 +src/musashi/m68kops.h src/musashi/m68kops.c src/musashi/m68kopac.c src/musashi/m68kopdm.c src/musashi/m68kopnz.c:	obj/musashi/m68kmake src/musashi/m68k_in.c
    1.59  	./obj/musashi/m68kmake src/musashi src/musashi/m68k_in.c
    1.60  
    1.61  ####