95 lines
3.2 KiB
Makefile
95 lines
3.2 KiB
Makefile
CC = i686-pc-toaru-gcc
|
|
CPP = i686-pc-toaru-g++
|
|
CFLAGS = -std=c99 -O3 -m32 -Wa,--32 -Xlinker --eh-frame-hdr
|
|
CPPFLAGS = -O3 -m32 -Wa,--32
|
|
EXTRAFLAGS = -g
|
|
EXECUTABLES = $(patsubst %.c,%.o,$(wildcard lib/*.c)) $(patsubst %.c,../hdd/bin/%,$(wildcard *.c)) $(patsubst %.cpp,../hdd/bin/%,$(wildcard *.cpp))
|
|
|
|
BEG = ../util/mk-beg
|
|
END = ../util/mk-end
|
|
INFO = ../util/mk-info
|
|
ERRORS = 2>>/tmp/.`whoami`-build-errors || ../util/mk-error
|
|
ERRORSS = >>/tmp/.`whoami`-build-errors || ../util/mk-error
|
|
|
|
BEGRM = ../util/mk-beg-rm
|
|
ENDRM = ../util/mk-end-rm
|
|
|
|
FREETYPE_INC = -I ../util/toaru-toolchain/i686-pc-toaru/include/freetype2/
|
|
FREETYPE_LIB = ../util/toaru-toolchain/i686-pc-toaru/lib/libfreetype.a
|
|
LIBM = ../util/toaru-toolchain/i686-pc-toaru/lib/libm.a
|
|
|
|
|
|
.PHONY: all clean
|
|
|
|
all: ${EXECUTABLES}
|
|
|
|
clean:
|
|
@${BEGRM} "RM" "Cleaning userspace full-toolchain applications."
|
|
@-rm -f ${EXECUTABLES}
|
|
@${ENDRM} "RM" "Cleaned userspace full-toolchain applications."
|
|
|
|
../hdd/bin/freetype_test: freetype_test.c
|
|
@${BEG} "CC" "$< [freetype]"
|
|
@${CC} ${CFLAGS} ${EXTRAFLAGS} ${FREETYPE_INC} -o $@ $< ${FREETYPE_LIB} ${ERRORS}
|
|
@${END} "CC" "$< [freetype]"
|
|
|
|
../hdd/bin/terminal: terminal.c lib/graphics.o lib/list.o lib/window.o
|
|
@${BEG} "CC" "$< [w/libs]"
|
|
@${CC} ${CFLAGS} ${EXTRAFLAGS} ${FREETYPE_INC} -o $@ $< lib/graphics.o lib/list.o lib/window.o ${FREETYPE_LIB} ${ERRORS}
|
|
@${END} "CC" "$< [w/libs]"
|
|
|
|
../hdd/bin/login: login.c lib/sha2.o
|
|
@${BEG} "CC" "$< [w/libs]"
|
|
@${CC} ${CFLAGS} ${EXTRAFLAGS} -o $@ $< lib/sha2.o ${ERRORS}
|
|
@${END} "CC" "$< [w/libs]"
|
|
|
|
../hdd/bin/compositor: compositor.c lib/graphics.o lib/list.o lib/window.o
|
|
@${BEG} "CC" "$< [w/libs]"
|
|
@${CC} ${CFLAGS} ${EXTRAFLAGS} ${FREETYPE_INC} -o $@ $< lib/graphics.o lib/list.o lib/window.o ${FREETYPE_LIB} ${ERRORS}
|
|
@${END} "CC" "$< [w/libs]"
|
|
|
|
../hdd/bin/drawlines: drawlines.c lib/graphics.o lib/list.o lib/window.o
|
|
@${BEG} "CC" "$< [w/libs]"
|
|
@${CC} ${CFLAGS} ${EXTRAFLAGS} ${FREETYPE_INC} -o $@ $< lib/graphics.o lib/list.o lib/window.o ${FREETYPE_LIB} ${ERRORS}
|
|
@${END} "CC" "$< [w/libs]"
|
|
|
|
../hdd/bin/glogin: glogin.c lib/graphics.o lib/list.o lib/window.o
|
|
@${BEG} "CC" "$< [w/libs]"
|
|
@${CC} ${CFLAGS} ${EXTRAFLAGS} ${FREETYPE_INC} -o $@ $< lib/graphics.o lib/list.o lib/window.o -lm ${FREETYPE_LIB} ${ERRORS}
|
|
@${END} "CC" "$< [w/libs]"
|
|
|
|
../hdd/bin/julia-win: julia-win.c lib/graphics.o lib/list.o lib/window.o
|
|
@${BEG} "CC" "$< [w/libs]"
|
|
@${CC} ${CFLAGS} ${EXTRAFLAGS} ${FREETYPE_INC} -o $@ $< lib/graphics.o lib/list.o lib/window.o ${FREETYPE_LIB} ${ERRORS}
|
|
@${END} "CC" "$< [w/libs]"
|
|
|
|
../hdd/bin/solver: solver.c lib/list.o
|
|
@${BEG} "CC" "$< [w/libs]"
|
|
@${CC} ${CFLAGS} ${EXTRAFLAGS} -o $@ $< lib/list.o ${ERRORS}
|
|
@${END} "CC" "$< [w/libs]"
|
|
|
|
../hdd/bin/donu%: donu%.c
|
|
@${BEG} "CC" "$< [w/libs]"
|
|
@${CC} ${CFLAGS} ${EXTRAFLAGS} -o $@ $< ${LIBM} ${ERRORS}
|
|
@${END} "CC" "$< [w/libs]"
|
|
|
|
../hdd/bin/%: %.cpp
|
|
@${BEG} "CPP" "$<"
|
|
@${CPP} ${CPPFLAGS} ${EXTRAFLAGS} -o $@ $< ${ERRORS}
|
|
@${END} "CPP" "$<"
|
|
|
|
../hdd/bin/ld: ld.c
|
|
@${BEG} "CC" "$< [-fPIC]"
|
|
@${CC} ${CFLAGS} ${EXTRAFLAGS} -fPIC -o $@ $< ${ERRORS}
|
|
@${END} "CC" "$< [-fPIC]"
|
|
|
|
../hdd/bin/%: %.c
|
|
@${BEG} "CC" "$<"
|
|
@${CC} ${CFLAGS} ${EXTRAFLAGS} -o $@ $< ${ERRORS}
|
|
@${END} "CC" "$<"
|
|
|
|
%.o: %.c
|
|
@${BEG} "CC" "$< [lib]"
|
|
@${CC} ${CFLAGS} -c ${EXTRAFLAGS} -o $@ $< ${ERRORS}
|
|
@${END} "CC" "$< [lib]"
|