Changeset 566ebca in buchla-emu for Makefile


Ignore:
Timestamp:
07/17/2017 06:05:04 AM (7 years ago)
Author:
Thomas Lopatic <thomas@…>
Branches:
master
Children:
0efe297
Parents:
9373f5e
Message:

Support OS X.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r9373f5e r566ebca  
     1OS :=                   $(shell uname)
     2
    13SDL2 :=                 /opt/sdl2
    24SDL2_INC :=             $(SDL2)/include
    35SDL2_LIB :=             $(SDL2)/lib
    46
    5 FLAGS :=                -std=c99 -pthread -O2 -gdwarf-4
     7FLAGS :=                -std=c99 -O2 -gdwarf-4
    68
    7 FLAGS_CPU :=    $(FLAGS) -I cpu -I build
     9FLAGS_CPU :=    $(FLAGS) -pthread -I cpu -I build
    810
    9 FLAGS_EMU :=    $(FLAGS) \
     11FLAGS_EMU :=    $(FLAGS) -pthread \
    1012                                -fno-strict-aliasing -fno-inline -fno-omit-frame-pointer \
    1113                                -Wall -Wextra \
     
    1416                                -I cpu -I emu -I build -I $(SDL2_INC)
    1517
     18ifeq ($(OS), Linux)
     19FLAGS_LNK :=    $(FLAGS) -pthread -Wall -Wextra
     20LIBS :=                 $(SDL2_LIB)/libSDL2.a -ldl -lm
     21endif
     22
     23ifeq ($(OS), Darwin)
    1624FLAGS_LNK :=    $(FLAGS) -Wall -Wextra
     25LIBS :=                 $(SDL2_LIB)/libSDL2.a \
     26                                -framework AppKit \
     27                                -framework AudioToolbox \
     28                                -framework Carbon \
     29                                -framework CoreAudio \
     30                                -framework CoreFoundation \
     31                                -framework CoreGraphics \
     32                                -framework CoreVideo \
     33                                -framework ForceFeedback \
     34                                -framework IOKit \
     35                                -l iconv
     36endif
    1737
    1838HEADERS :=              $(wildcard cpu/*.h) $(wildcard emu/*.h)
     
    5979                                gcc $(FLAGS_LNK) -o buchla \
    6080                                $(CPU_OP) $(GEN_OP) $(EMU_OP) \
    61                                 $(SDL2_LIB)/libSDL2.a -ldl -lm
     81                                $(LIBS)
    6282
    6383run:                    buchla
Note: See TracChangeset for help on using the changeset viewer.