~ubuntu-branches/debian/sid/mame/sid

« back to all changes in this revision

Viewing changes to makefile

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Emmanuel Kasper, Jordi Mallach
  • Date: 2012-06-05 20:02:23 UTC
  • mfrom: (0.3.1) (0.1.4)
  • Revision ID: package-import@ubuntu.com-20120605200223-gnlpogjrg6oqe9md
Tags: 0.146-1
[ Emmanuel Kasper ]
* New upstream release
* Drop patch to fix man pages section and patches to link with flac 
  and jpeg system lib: all this has been pushed upstream by Cesare Falco
* Add DM-Upload-Allowed: yes field.

[ Jordi Mallach ]
* Create a "gnu" TARGETOS stanza that defines NO_AFFINITY_NP.
* Stop setting TARGETOS to "unix" in d/rules. It should be autodetected,
  and set to the appropriate value.
* mame_manpage_section.patch: Change mame's manpage section to 6 (games),
  in the TH declaration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
ifeq ($(firstword $(filter Darwin,$(UNAME))),Darwin)
96
96
TARGETOS = macosx
97
97
endif
 
98
ifeq ($(firstword $(filter GNU,$(UNAME))),GNU)
 
99
TARGETOS = gnu
 
100
endif
98
101
 
99
102
ifndef TARGETOS
100
103
$(error Unable to detect TARGETOS from uname -a: $(UNAME))
163
166
 
164
167
# uncomment and specify architecture-specific optimizations here
165
168
# some examples:
166
 
#   optimize for I686:   ARCHOPTS = -march=pentiumpro
167
 
#   optimize for Core 2: ARCHOPTS = -march=core2
168
 
#   optimize for G4:     ARCHOPTS = -mcpu=G4
 
169
#   ARCHOPTS = -march=pentiumpro  # optimize for I686
 
170
#   ARCHOPTS = -march=core2       # optimize for Core 2
 
171
#   ARCHOPTS = -march=native      # optimize for local machine (auto detect)
 
172
#   ARCHOPTS = -mcpu=G4           # optimize for G4
169
173
# note that we leave this commented by default so that you can
170
174
# configure this in your environment and never have to think about it
171
175
# ARCHOPTS =
211
215
# uncomment next line to build zlib as part of MAME build
212
216
BUILD_ZLIB = 1
213
217
 
 
218
# uncomment next line to build libflac as part of MAME build
 
219
BUILD_FLAC = 1
 
220
 
 
221
# uncomment next line to build jpeglib as part of MAME build
 
222
BUILD_JPEGLIB = 1
 
223
 
214
224
# uncomment next line to include the symbols
215
225
# SYMBOLS = 1
216
226
 
217
 
# uncomment next line to build jpeglib as part of MAME build
218
 
BUILD_JPEGLIB = 1
219
 
 
220
 
# uncomment next line to build libflac as part of MAME build
221
 
BUILD_FLAC = 1
222
 
 
223
227
# specify symbols level or leave commented to use the default
224
228
# (default is SYMLEVEL = 2 normally; use 1 if you only need backtrace)
225
229
# SYMLEVEL = 2
421
425
DEFS += -DFLAC__NO_DLL
422
426
endif
423
427
 
 
428
# define USE_SYSTEM_JPEGLIB if library shipped with MAME is not used
 
429
ifneq ($(BUILD_JPEGLIB),1)
 
430
DEFS += -DUSE_SYSTEM_JPEGLIB
 
431
endif
 
432
 
 
433
 
424
434
 
425
435
#-------------------------------------------------
426
436
# compile flags
467
477
# add the optimization flag
468
478
CCOMFLAGS += -O$(OPTIMIZE)
469
479
 
 
480
# add the error warning flag
 
481
ifndef NOWERROR
 
482
CCOMFLAGS += -Werror
 
483
endif
 
484
 
470
485
# if we are optimizing, include optimization options
471
 
# and make all errors into warnings
472
486
ifneq ($(OPTIMIZE),0)
473
 
ifneq ($(TARGETOS),os2)
474
 
ifndef NOWERROR
475
 
CCOMFLAGS += -Werror -fno-strict-aliasing $(ARCHOPTS)
476
 
else
477
 
CCOMFLAGS += -fno-strict-aliasing $(ARCHOPTS)
478
 
endif
479
 
else
480
 
CCOMFLAGS += -fno-strict-aliasing $(ARCHOPTS)
481
 
endif
 
487
CCOMFLAGS += -fno-strict-aliasing $(ARCHOPTS)
482
488
endif
483
489
 
484
490
# add a basic set of warnings
598
604
EMUINFOOBJ = $(OBJ)/$(TARGET)/$(TARGET).o
599
605
DRIVLISTSRC = $(OBJ)/$(TARGET)/$(SUBTARGET)/drivlist.c
600
606
DRIVLISTOBJ = $(OBJ)/$(TARGET)/$(SUBTARGET)/drivlist.o
601
 
DEVLISTSRC = $(OBJ)/$(TARGET)/$(SUBTARGET)/devlist.c
602
 
DEVLISTOBJ = $(OBJ)/$(TARGET)/$(SUBTARGET)/devlist.o
603
607
 
604
608
 
605
609
 
629
633
ZLIB =
630
634
endif
631
635
 
632
 
# add SoftFloat floating point emulation library
633
 
SOFTFLOAT = $(OBJ)/libsoftfloat.a
634
 
 
635
 
# add formats emulation library
636
 
FORMATS_LIB = $(OBJ)/libformats.a
 
636
# add flac library
 
637
ifeq ($(BUILD_FLAC),1)
 
638
INCPATH += -I$(SRC)/lib/util
 
639
FLAC_LIB = $(OBJ)/libflac.a
 
640
# $(OBJ)/libflac++.a
 
641
else
 
642
LIBS += -lFLAC
 
643
FLAC_LIB =
 
644
endif
637
645
 
638
646
# add jpeglib image library
639
647
ifeq ($(BUILD_JPEGLIB),1)
644
652
JPEG_LIB =
645
653
endif
646
654
 
647
 
# add flac library
648
 
ifeq ($(BUILD_FLAC),1)
649
 
INCPATH += -I$(SRC)/lib/libflac/include
650
 
FLAC_LIB = $(OBJ)/libflac.a
651
 
else
652
 
LIBS += -lFLAC
653
 
FLAC_LIB =
654
 
endif
 
655
# add SoftFloat floating point emulation library
 
656
SOFTFLOAT = $(OBJ)/libsoftfloat.a
 
657
 
 
658
# add formats emulation library
 
659
FORMATS_LIB = $(OBJ)/libformats.a
655
660
 
656
661
#-------------------------------------------------
657
662
# 'default' target needs to go here, before the 
663
668
all: default tools
664
669
 
665
670
 
 
671
7Z_LIB = $(OBJ)/lib7z.a 
666
672
 
667
673
#-------------------------------------------------
668
674
# defines needed by multiple make files 
752
758
 
753
759
ifndef EXECUTABLE_DEFINED
754
760
 
755
 
# always recompile the version string
756
 
$(VERSIONOBJ): $(DRVLIBS) $(LIBOSD) $(LIBCPU) $(LIBEMU) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(ZLIB) $(SOFTFLOAT) $(FORMATS_LIB) $(LIBOCORE) $(RESFILE)
757
 
 
758
 
$(EMULATOR): $(VERSIONOBJ) $(EMUINFOOBJ) $(DRIVLISTOBJ) $(DEVLISTOBJ) $(DRVLIBS) $(LIBOSD) $(LIBCPU) $(LIBEMU) $(LIBDASM) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(SOFTFLOAT) $(JPEG_LIB) $(FLAC_LIB) $(FORMATS_LIB) $(ZLIB) $(LIBOCORE) $(RESFILE)
 
761
$(EMULATOR): $(VERSIONOBJ) $(EMUINFOOBJ) $(DRIVLISTOBJ) $(DRVLIBS) $(LIBOSD) $(LIBCPU) $(LIBEMU) $(LIBDASM) $(LIBSOUND) $(LIBUTIL) $(EXPAT) $(SOFTFLOAT) $(JPEG_LIB) $(FLAC_LIB) $(7Z_LIB) $(FORMATS_LIB) $(ZLIB) $(LIBOCORE) $(RESFILE)
 
762
        $(CC) $(CDEFS) $(CFLAGS) -c $(SRC)/version.c -o $(VERSIONOBJ)
759
763
        @echo Linking $@...
760
764
        $(LD) $(LDFLAGS) $(LDFLAGSEMULATOR) $^ $(LIBS) -o $@
761
765
ifeq ($(TARGETOS),win32)
762
766
ifdef SYMBOLS
 
767
ifndef MSVC_BUILD
763
768
        $(OBJDUMP) --section=.text --line-numbers --syms --demangle $@ >$(FULLNAME).sym
764
769
endif
765
770
endif
 
771
endif
766
772
 
767
773
endif
768
774
 
797
803
        @echo Compiling $<...
798
804
        $(CC) $(CDEFS) $(CFLAGS) -c $< -o $@
799
805
 
800
 
$(DEVLISTOBJ): $(DEVLISTSRC)
801
 
        @echo Compiling $<...
802
 
        $(CC) $(CDEFS) $(CFLAGS) -c $< -o $@
803
 
 
804
806
$(DRIVLISTSRC): $(SRC)/$(TARGET)/$(SUBTARGET).lst $(MAKELIST_TARGET)
805
807
        @echo Building driver list $<...
806
808
        @$(MAKELIST) $< >$@
807
809
 
808
 
$(DEVLISTSRC): $(SRC)/$(TARGET)/$(SUBTARGET)_dev.lst $(MAKEDEV_TARGET)
809
 
        @echo Building device list $<...
810
 
        @$(MAKEDEV) $< >$@
811
 
 
812
810
$(OBJ)/%.a:
813
811
        @echo Archiving $@...
814
812
        $(RM) $@