VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Build
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2014-07-30 15:37:50 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2014-11-08 23:22:05 +0100
commit73bf608efc913589992903ebdbab1da5c115b49d (patch)
tree8de0aa35aa82b40883c8d7f72aee21b612b3d31e /src/Build
parent6688c9d85a0a5aecca0b2de77fcf5ff7cf83dfba (diff)
downloadVeraCrypt-73bf608efc913589992903ebdbab1da5c115b49d.tar.gz
VeraCrypt-73bf608efc913589992903ebdbab1da5c115b49d.zip
MacOSX : Correct issue of compiling assembly files in both 32-bit and 64-bit mode. Modify Makefiles to correct compilation process using latest Xcode.
Diffstat (limited to 'src/Build')
-rw-r--r--src/Build/Include/Makefile.inc17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/Build/Include/Makefile.inc b/src/Build/Include/Makefile.inc
index 39395e95..a6fd58a2 100644
--- a/src/Build/Include/Makefile.inc
+++ b/src/Build/Include/Makefile.inc
@@ -10,7 +10,7 @@ $(NAME): $(NAME).a
clean:
@echo Cleaning $(NAME)
- rm -f $(APPNAME) $(NAME).a $(OBJS) $(OBJS:.o=.d) *.gch
+ rm -f $(APPNAME) $(NAME).a $(OBJS) $(OBJSEX) $(OBJS:.o=.d) *.gch
%.o: %.c
@echo Compiling $(<F)
@@ -20,10 +20,17 @@ clean:
@echo Compiling $(<F)
$(CXX) $(CXXFLAGS) -c $< -o $@
+ifeq "$(PLATFORM)" "MacOSX"
+%.o: %.asm
+ @echo Assembling $(<F)
+ $(AS) $(ASFLAGS) -f macho32 -o $@.32 $<
+ $(AS) $(ASFLAGS) -f macho64 -o $@.64 $<
+ lipo -create $@.32 $@.64 -output $@
+else
%.o: %.asm
@echo Assembling $(<F)
$(AS) $(ASFLAGS) -o $@ $<
-
+endif
# Precompiled headers
%.h.gch: %.h
@@ -49,10 +56,10 @@ TR_SED_BIN := tr '\n' ' ' | tr -s ' ' ',' | sed -e 's/^,//g' -e 's/,$$/n/' | tr
# Dependencies
--include $(OBJS:.o=.d)
+-include $(OBJS:.o=.d) $(OBJSEX:.oo=.d)
-$(NAME).a: $(OBJS)
+$(NAME).a: $(OBJS) $(OBJSEX)
@echo Updating library $@
- $(AR) $(AFLAGS) -rcu $@ $(OBJS)
+ $(AR) $(AFLAGS) -rcu $@ $(OBJS) $(OBJSEX)
$(RANLIB) $@