osx64.mak 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # This makefile creates the UASM binary for macOS 64-bit
  2. TARGET1=uasm
  3. ifndef DEBUG
  4. DEBUG=0
  5. endif
  6. inc_dirs = -IH
  7. #cflags stuff
  8. ifeq ($(DEBUG),0)
  9. extra_c_flags = -DNDEBUG -O3 -Wno-parentheses -Wno-pointer-sign -Wno-switch -Wno-comment -Wno-unsequenced -Wno-enum-conversion -Wno-incompatible-pointer-types
  10. #-funsigned-char -fwritable-strings
  11. OUTD=GccUnixR
  12. else
  13. extra_c_flags = -DDEBUG_OUT -g
  14. OUTD=GccUnixD
  15. endif
  16. c_flags = -D __UNIX__ $(extra_c_flags)
  17. .SUFFIXES:
  18. .SUFFIXES: .c .o
  19. include gccmod.inc
  20. #.c.o:
  21. # $(CC) -c $(inc_dirs) $(c_flags) -o $(OUTD)/$*.o $<
  22. $(OUTD)/%.o: %.c
  23. $(CC) -c $(inc_dirs) $(c_flags) -o $(OUTD)/$*.o $<
  24. all: $(OUTD) $(OUTD)/$(TARGET1)
  25. $(OUTD):
  26. mkdir $(OUTD)
  27. $(OUTD)/$(TARGET1) : $(OUTD)/main.o $(proj_obj)
  28. ifeq ($(DEBUG),0)
  29. $(CC) -D __UNIX__ $(OUTD)/main.o $(proj_obj) -o $@ -Wl,-S,-dead_strip,-dead_strip_dylibs
  30. strip -x $@
  31. else
  32. $(CC) -D __UNIX__ $(OUTD)/main.o $(proj_obj) -o $@ -Wl
  33. endif
  34. $(OUTD)/msgtext.o: msgtext.c H/msgdef.h
  35. $(CC) -c $(inc_dirs) $(c_flags) -o $*.o msgtext.c
  36. $(OUTD)/reswords.o: reswords.c H/instruct.h H/special.h H/directve.h H/opndcls.h H/instravx.h
  37. $(CC) -c $(inc_dirs) $(c_flags) -o $*.o reswords.c
  38. ######
  39. clean:
  40. rm -f $(OUTD)/$(TARGET1)
  41. rm -f $(OUTD)/*.o
  42. rm -f $(OUTD)/*.map