Commit 329536de authored by Mart Lubbers's avatar Mart Lubbers

Directory structure

parent df10ad3d
Pipeline #15126 failed with stage
in 1 minute and 32 seconds
Clean System Files
TTY
Monitor
sapl
test
*.o
*.exe
*.prj
*.prp
......
CLEAN_HOME?=/opt/clean
CFLAGS?=-Wall -Wextra -DDEBUG
ifeq ($(OS), Windows_NT)
DETECTED_OS?=Windows
LIBFOLDER?=Libraries
CC=gcc
else
DETECTED_OS?=POSIX
LIBFOLDER?=lib
endif
all: Clean\ System\ Files/ctty.o
test: test.icl TTY.icl TTY.dcl Clean\ System\ Files/ctty.o
clm -I $(DETECTED_OS) -IL Platform $(basename $<) -o $@
Clean\ System\ Files/ctty.o: tty.c
mkdir -p Clean\ System\ Files
$(CC) $(CFLAGS) -c "$<" -o "$@"
Monitor.prj:
cpm project $(basename $@) create
cpm project $@ target iTasks
cpm project $@ set -h 2000m -s 20m -dynamics
cpm project $@ path add "$$PWD/POSIX"
install: Clean\ System\ Files/ctty.o $(LIBFILE)
mkdir $(CLEAN_HOME)/$(LIBFOLDER)/CleanSerial
cp -R TTY.[id]cl iTasksTTY.[id]cl $(DETECTED_OS)/Platform.[id]cl "Clean System Files" $(CLEAN_HOME)/$(LIBFOLDER)/CleanSerial
cp -f $(DETECTED_OS)/*_library "$(CLEAN_HOME)/$(LIBFOLDER)/CleanSerial"
clean:
$(RM) -r $(DETECTED_OS)/Clean\ System\ Files/* Clean\ System\ Files/* test
#!/bin/sh
#!/bin/bash
set -e
trap "rm -rf CleanSerial" EXIT
#linux
mkdir CleanSerial
rm -rf "./Clean System Files/*"
make -B 'Clean System Files/ctty.o'
mv 'Clean System Files' CleanSerial
cp TTY.[id]cl iTasksTTY.[id]cl POSIX/Platform.[id]cl CleanSerial
tar -czvf CleanSerial-linux64.tar.gz CleanSerial
rm -r CleanSerial
mkpkg() {
rm -rf CleanSerial
mkdir -p CleanSerial
make $1 -C src clean all
cp -Rv src/"Clean System Files" CleanSerial
cp -v src/{TTY,iTasksTTY}.[id]cl src/$2/Platform.[id]cl CleanSerial
$3 CleanSerial-$4 CleanSerial
}
#linux
mkpkg "" POSIX "tar -czvf" linux64.tar.gz
#windows64
mkdir CleanSerial
rm -rf "./Clean System Files/*"
DETECTED_OS=Windows CC=x86_64-w64-mingw32-gcc make -B 'Clean System Files/ctty.o'
mv 'Clean System Files' CleanSerial
cp TTY.[id]cl iTasksTTY.[id]cl Windows/Platform.[id]cl CleanSerial
cp Windows/*_library CleanSerial/Clean\ System\ Files
zip -rv CleanSerial-win64.zip CleanSerial
rm -r CleanSerial
mkpkg "DETECTED_OS=Windows CC=x86_64-w64-mingw32-gcc" Windows "zip -rv" win64.zip
#windows32
mkdir CleanSerial
rm -rf "./Clean System Files/*"
DETECTED_OS=Windows CC=x86_64-w64-mingw32-gcc-win32 make -B 'Clean System Files/ctty.o'
mv 'Clean System Files' CleanSerial
cp TTY.[id]cl iTasksTTY.[id]cl Windows/Platform.[id]cl CleanSerial
cp Windows/*_library CleanSerial/Clean\ System\ Files
zip -rv CleanSerial-win32.zip CleanSerial
rm -r CleanSerial
mkpkg "DETECTED_OS=Windows CC=x86_64-w64-mingw32-gcc-win32" Windows "zip -rv" win32.zip
CFLAGS?=-Wall -Wextra
ifeq ($(OS), Windows_NT)
DETECTED_OS?=Windows
CC=gcc
else
DETECTED_OS?=POSIX
endif
LIBFILES=$(wildcard $(DETECTED_OS)/*library)
VPATH = src:../csource
all: $(addprefix Clean\ System\ Files/,ctty.o $(LIBFILES))
Clean\ System\ Files/%: %
mkdir -p "Clean System Files"
cp "$<" "Clean System Files"
ctty.o: tty.c
$(COMPILE.c) $(OUTPUT_OPTION) $<
clean:
$(RM) -rf Clean\ System\ Files
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment