--- hatari/src/Makefile 2019/04/01 07:09:16 1.1 +++ hatari/src/Makefile 2019/04/01 07:10:11 1.1.1.5 @@ -1,16 +1,26 @@ # Makefile for Hatari -# Set flags passed to the compiler (e.g. optimization flags) -CMPLRFLAGS = -g -O3 -fomit-frame-pointer - # Set the C compiler (e.g. gcc) CC = gcc +# Set flags passed to the compiler (e.g. optimization flags) +CMPLRFLAGS = -O3 -fomit-frame-pointer -Wall -Wno-unused + +# Here you can define the default data directory for Hatari where it +# looks for the default TOS image etc. +# For example you can use the local directory with . or if you want to do +# a system-wide installation, use something like /usr/share/hatari +DATADIR = . -SDLLIB=$(shell sdl-config --libs) -SDLFLAGS=$(shell sdl-config --cflags) +# SDL-Library configuration: +SDLLIB = $(shell sdl-config --libs) +SDLFLAGS = $(shell sdl-config --cflags) -CFLAGS = -I./includes -I./uae-cpu $(CMPLRFLAGS) $(SDLFLAGS) +# Additional include directories: +INCFLAGS = -I./includes -I./uae-cpu + + +CFLAGS = $(CMPLRFLAGS) $(INCFLAGS) $(SDLFLAGS) CPUOBJS = ./uae-cpu/hatari-glue.o ./uae-cpu/memory.o ./uae-cpu/newcpu.o \ @@ -19,28 +29,35 @@ CPUOBJS = ./uae-cpu/hatari-glue.o ./uae- ./uae-cpu/cpuemu4.o ./uae-cpu/cpuemu5.o ./uae-cpu/cpuemu6.o \ ./uae-cpu/cpuemu7.o ./uae-cpu/cpuemu8.o -SRCS = audio.c bios.c cart.c configuration.c createBlankImage.c \ - createDiscImage.c debug.c dialog.c disass.c errlog.c fdc.c file.c \ - floppy.c gemdos.c ikbd.c int.c intercept.c joy.c keymap.c m68000.c \ - main.c midi.c memAlloc.c memorySnapShot.c mfp.c misc.c msa.c pcx.c psg.c \ +SRCS = audio.c bios.c blitter.c cart.c configuration.c createBlankImage.c \ + createDiscImage.c debug.c debugui.c dialog.c errlog.c fdc.c file.c \ + floppy.c gemdos.c hdc.c ikbd.c int.c intercept.c joy.c keymap.c m68000.c \ + main.c midi.c memAlloc.c memorySnapShot.c mfp.c misc.c msa.c psg.c \ printer.c rs232.c reset.c st.c stMemory.c screen.c screenConvert.c \ - screenSnapShot.c shortcut.c sound.c spec512.c statusBar.c timer.c \ - tos.c vdi.c video.c view.c wavFormat.c xbios.c ymFormat.c + screenSnapShot.c sdlgui.c shortcut.c sound.c spec512.c \ + tos.c vdi.c video.c wavFormat.c xbios.c ymFormat.c OBJS = $(SRCS:.c=.o) hatari: $(OBJS) cpu $(CC) $(OBJS) $(CPUOBJS) $(SDLLIB) -o hatari + strip hatari cpu: - $(MAKE) -C uae-cpu/ CFLAGS="$(CMPLRFLAGS)" CC="$(CC)" all + $(MAKE) -C uae-cpu/ CC="$(CC)" CMPLRFLAGS="$(CMPLRFLAGS)" SDLFLAGS="$(SDLFLAGS)" all clean: rm -f *.o hatari $(MAKE) -C uae-cpu/ clean +configuration.o: configuration.c + $(CC) $(CFLAGS) -c -DDATADIR=\"$(DATADIR)\" configuration.c -o configuration.o + +sdlgui.o: sdlgui.c + $(CC) $(CFLAGS) -c -DDATADIR=\"$(DATADIR)\" sdlgui.c -o sdlgui.o + screenConvert.o: convert/high640x1.c convert/low640x16.c convert/spec320x16.c \ convert/vdi4.c convert/high640x8.c convert/low640x8.c convert/spec640x16.c \ convert/low320x16.c convert/med640x16.c convert/vdi16.c \