Added builds with musl Makefile

This commit is contained in:
Pentium44 2021-04-10 03:39:57 -07:00
parent ce4d2298d4
commit 11c7242c63
8 changed files with 52 additions and 3 deletions

View File

@ -7,10 +7,13 @@ VERSION_EXTRA = \"$(EXTRA)\"
PREFIX ?= /usr
#CC ?= musl-gcc
CC ?= gcc
CFLAGS += -pedantic -g -Wall -Wextra
#CC ?= tcc
#CC ?= musl-tcc
CFLAGS += -O2 -pedantic -g -Wall -Wextra
CPPFLAGS += -DVERSION=$(VERSION) -D_FORTIFY_SOURCE=2
LDFLAGS += -Wl,-O1 -lm
LDFLAGS += -lm
BIN ?= slidescript
SRCS=$(wildcard src/*.c)

38
Makefile.musl Normal file
View File

@ -0,0 +1,38 @@
# SlideScript makefile
# (C) Copyright 2014-2021 Chris Dorman, some rights reserved (GPLv2)
# Some changes and tweaks from Menchers
VERSION = \"0.5.0\"
VERSION_EXTRA = \"$(EXTRA)\"
PREFIX ?= /usr
#CC ?= musl-gcc
#CC ?= gcc
#CC ?= tcc
CC ?= musl-tcc
CFLAGS += -O2 -pedantic -g -Wall -Wextra
CPPFLAGS += -DVERSION=$(VERSION) -D_FORTIFY_SOURCE=2
LDFLAGS += -lc -L/planck/lib/tcc -L/planck/lib -ltcc1 -dynamic-linker /planck/lib/libc.so /planck/lib/crti.o /planck/lib/crt1.o /planck/lib/crtn.o -nostdlib
BIN ?= slidescript
SRCS=$(wildcard src/*.c)
OBJECTS=$(SRCS:%.c=%.o)
all: main
fresh: clean all
.c.o:
$(CC) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
main: $(OBJECTS)
$(CC) $(OBJECTS) -o $(BIN) $(LDFLAGS) $(CFLAGS)
clean:
rm -f $(OBJECTS) $(BIN)
install:
install -D $(BIN) $(DESTDIR)/$(PREFIX)/bin/$(BIN)

View File

@ -15,6 +15,14 @@ Compiling
***NOTE: if compiling on OSX/BSD, please uncomment #define BSD in src/config.h***
-----
Directory bins/
-----
Since slidescript is so small, I made a collection of current builds of slidescript
in bins/*
These are built on Debian 10 using GCC 9.2.0, and current TCC.
-----
Documentation
-----

BIN
bins/slidescript.gcc-glibc-x86_64 Executable file

Binary file not shown.

BIN
bins/slidescript.gcc-musl-x86_64 Executable file

Binary file not shown.

BIN
bins/slidescript.tcc-glibc-x86_64 Executable file

Binary file not shown.

BIN
bins/slidescript.tcc-musl-x86_64 Executable file

Binary file not shown.

View File

@ -1,3 +1,3 @@
// DEFINE IF YOU WANT TO COMPILE VIA BSD / OSX
//#define BSD 1
#define BSD 1