Created
March 3, 2018 15:26
-
-
Save mykeels/bcf0a7d5b660ea54655c001cdc8846b6 to your computer and use it in GitHub Desktop.
Build S.I.M.P.L.E for macOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # to be placed in ./bootsrc/sources of https://github.com/simple-lang/simple | |
| program_NAME := simple | |
| program_C_SRCS := $(wildcard *.c) | |
| program_CXX_SRCS := $(wildcard *.cpp) | |
| program_C_OBJS := ${program_C_SRCS:.c=.o} | |
| program_CXX_OBJS := ${program_CXX_SRCS:.cpp=.o} | |
| program_OBJS := $(program_C_OBJS) $(program_CXX_OBJS) | |
| program_INCLUDE_DIRS := | |
| program_LIBRARY_DIRS := | |
| program_LIBRARIES := | |
| CPPFLAGS += $(foreach includedir,$(program_INCLUDE_DIRS),-I$(includedir)) | |
| LDFLAGS += $(foreach librarydir,$(program_LIBRARY_DIRS),-L$(librarydir)) | |
| LDFLAGS += $(foreach library,$(program_LIBRARIES),-l$(library)) | |
| all: $(program_NAME) | |
| $(program_NAME): $(program_OBJS) | |
| $(CC) -dynamiclib *.o -o simple.dylib | |
| $(CC) ../simple.c -id simple.dylib | |
| rm -rf *.o | |
| mkdir -p ../../dist | |
| mv "./simple.dylib" "../../dist/simple.dylib" | |
| mv "./a.out" "../../dist/simple" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment