osx/Makefile
changeset 171 c6e0af68825a
parent 168 dfb60716880c
child 172 43ae72f88d06
--- a/osx/Makefile
+++ b/osx/Makefile
@@ -2,14 +2,14 @@
       LD = ld
 	ARCH = -arch i386
   CFLAGS = -Wall -O2 -Iinclude
- LDFLAGS = $(ARCH)
-    NASM = /usr/local/bin/nasm -f macho -Iinclude/
+ LDFLAGS = $(ARCH) -Wl,-no_pie
+    NASM = nasm -f macho32 -Iinclude -g
 
   TARGETS = helloASM
-  #TARGETS+= helloC
+  TARGETS+= helloC
 
 OBJECTS  = hello.o main.o
-ENTRYPOINT = entryPoint
+ENTRYPOINT = _entryPoint
 
 .SUFFIXES: .c .asm
 
@@ -25,7 +25,7 @@
 
 helloC: $(OBJECTS)
 	@echo Linking $(OBJECTS) ...
-	$(CC) $(LDFLAGS) $(OBJECTS) -e $(ENTRYPOINT) -o $@
+	$(CC) $(LDFLAGS) $(OBJECTS) -o $@
 
 helloASM: hello.o
 	@echo Linking $(OBJECTS) ...