Skip to content

Commit 808d5a0

Browse files
authored
Merge pull request #105 from dasm-assembler/feature/build-for-mac-leopard
Feature/build for mac leopard
2 parents 1b75e89 + 0283480 commit 808d5a0

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ GWARN= -ansi -std=c99 -pedantic -Wall \
4747
#CFLAGS= $(GOPTI) $(GWARN) $(GDEBG)
4848
#LDFLAGS= -m32 -L/usr/lib32
4949

50+
ifeq ($(OS),Windows_NT)
51+
detected_OS := Windows
52+
else
53+
detected_OS := $(shell uname -s)
54+
ifeq ($(detected_OS),Darwin)
55+
CFLAGS = -mmacosx-version-min=10.5
56+
endif
57+
endif
58+
5059
#CC= gcc
5160

5261
OBJS= main.o ops.o globals.o exp.o symbols.o \
@@ -56,10 +65,11 @@ SRCS= main.c ops.c globals.c exp.c symbols.c \
5665

5766
ALL= dasm ftohex
5867

59-
all: $(ALL)
68+
all: $(info detected_OS is $(detected_OS)) \
69+
$(ALL)
6070

6171
dasm: $(OBJS)
62-
$(CC) $(OBJS) -o dasm $(LDFLAGS)
72+
$(CC) $(CFLAGS) $(OBJS) -o dasm $(LDFLAGS)
6373

6474
ftohex: ftohex.o
6575

0 commit comments

Comments
 (0)