diff --git a/Makefile b/Makefile index 3cb17c9..8de3975 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,15 @@ TARGET = devreset -all: $(TARGET) +all: universal -$(TARGET): devreset.c - gcc devreset.c -framework IOKit -framework CoreFoundation -o devreset +$(TARGET)_x86: $(TARGET).c + gcc $(TARGET).c -framework IOKit -framework CoreFoundation -o $(TARGET)_x86 -target x86_64-apple-macos10.12 + +$(TARGET)_arm: $(TARGET).c + gcc $(TARGET).c -framework IOKit -framework CoreFoundation -o $(TARGET)_arm -target arm64-apple-macos11 + +universal: $(TARGET)_x86 $(TARGET)_arm + lipo -create -output $(TARGET) $(TARGET)_x86 $(TARGET)_arm clean: - $(RM) $(TARGET) \ No newline at end of file + $(RM) $(TARGET) $(TARGET)_x86 $(TARGET)_arm