2011-04-30 04:54:07 +04:00
|
|
|
CC = i686-pc-toaru-gcc
|
2012-01-19 06:12:04 +04:00
|
|
|
CPP = i686-pc-toaru-g++
|
2012-01-29 08:27:37 +04:00
|
|
|
CFLAGS = -march=core2 -std=c99 -O3 -m32 -Wa,--32 -Xlinker --eh-frame-hdr
|
2012-01-19 06:12:04 +04:00
|
|
|
CPPFLAGS = -march=core2 -O3 -m32 -Wa,--32
|
2012-01-28 04:04:39 +04:00
|
|
|
EXECUTABLES = $(patsubst %.c,%.o,$(wildcard lib/*.c)) $(patsubst %.c,../hdd/bin/%,$(wildcard *.c)) $(patsubst %.cpp,../hdd/bin/%,$(wildcard *.cpp))
|
2012-01-26 03:07:42 +04:00
|
|
|
|
|
|
|
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
|
2011-04-30 04:54:07 +04:00
|
|
|
|
|
|
|
|
2011-10-28 10:09:55 +04:00
|
|
|
.PHONY: all clean
|
2011-04-30 04:54:07 +04:00
|
|
|
|
2011-10-28 10:09:55 +04:00
|
|
|
all: ${EXECUTABLES}
|
2011-04-30 12:40:36 +04:00
|
|
|
|
2011-10-28 10:09:55 +04:00
|
|
|
clean:
|
2012-01-26 03:07:42 +04:00
|
|
|
@${BEGRM} "RM" "Cleaning userspace full-toolchain applications."
|
|
|
|
@-rm -f ${EXECUTABLES}
|
|
|
|
@${ENDRM} "RM" "Cleaned userspace full-toolchain applications."
|
2011-04-30 04:54:07 +04:00
|
|
|
|
2011-12-16 23:16:20 +04:00
|
|
|
../hdd/bin/freetype_test: freetype_test.c
|
2012-01-26 03:07:42 +04:00
|
|
|
@${BEG} "CC" "$< [freetype]"
|
|
|
|
@${CC} ${CFLAGS} -s -I ../util/toaru-toolchain/i686-pc-toaru/include/freetype2/ -o $@ $< ../util/toaru-toolchain/i686-pc-toaru/lib/libfreetype.a ${ERRORS}
|
|
|
|
@${END} "CC" "$< [freetype]"
|
2011-12-16 23:16:20 +04:00
|
|
|
|
2012-01-29 08:27:37 +04:00
|
|
|
../hdd/bin/terminal: terminal.c lib/utf8_decode.o
|
2012-01-26 03:07:42 +04:00
|
|
|
@${BEG} "CC" "$< [freetype]"
|
2012-01-29 08:27:37 +04:00
|
|
|
@${CC} ${CFLAGS} -s -I ../util/toaru-toolchain/i686-pc-toaru/include/freetype2/ -o $@ $< ../util/toaru-toolchain/i686-pc-toaru/lib/libfreetype.a lib/utf8_decode.o ${ERRORS}
|
2012-01-26 03:07:42 +04:00
|
|
|
@${END} "CC" "$< [freetype]"
|
2012-01-23 09:36:49 +04:00
|
|
|
|
2012-01-28 04:04:39 +04:00
|
|
|
../hdd/bin/login: login.c lib/sha2.o
|
|
|
|
@${BEG} "CC" "$< [w/libs]"
|
|
|
|
@${CC} ${CFLAGS} -s -o $@ $< lib/sha2.o ${ERRORS}
|
|
|
|
@${END} "CC" "$< [w/libs]"
|
|
|
|
|
2012-02-04 05:47:36 +04:00
|
|
|
../hdd/bin/bootsplash-test: bootsplash-test.c lib/graphics.o lib/list.o
|
2012-02-04 04:16:47 +04:00
|
|
|
@${BEG} "CC" "$< [w/libs]"
|
2012-02-04 05:47:36 +04:00
|
|
|
@${CC} ${CFLAGS} -s -o $@ $< lib/graphics.o lib/list.o ${ERRORS}
|
2012-02-04 04:16:47 +04:00
|
|
|
@${END} "CC" "$< [w/libs]"
|
|
|
|
|
2012-01-30 03:05:42 +04:00
|
|
|
../hdd/bin/compositor: compositor.c lib/graphics.o lib/list.o
|
|
|
|
@${BEG} "CC" "$< [w/libs]"
|
|
|
|
@${CC} ${CFLAGS} -s -I ../util/toaru-toolchain/i686-pc-toaru/include/freetype2/ -o $@ $< lib/graphics.o lib/list.o ../util/toaru-toolchain/i686-pc-toaru/lib/libfreetype.a ${ERRORS}
|
|
|
|
@${END} "CC" "$< [w/libs]"
|
|
|
|
|
2012-02-01 00:30:12 +04:00
|
|
|
../hdd/bin/solver: solver.c lib/list.o
|
|
|
|
@${BEG} "CC" "$< [w/libs]"
|
|
|
|
@${CC} ${CFLAGS} -s -o $@ $< lib/list.o ${ERRORS}
|
|
|
|
@${END} "CC" "$< [w/libs]"
|
|
|
|
|
2012-01-19 06:12:04 +04:00
|
|
|
../hdd/bin/%: %.cpp
|
2012-01-26 03:07:42 +04:00
|
|
|
@${BEG} "CPP" "$<"
|
|
|
|
@${CPP} ${CPPFLAGS} -s -o $@ $< ${ERRORS}
|
|
|
|
@${END} "CPP" "$<"
|
2012-01-19 06:12:04 +04:00
|
|
|
|
|
|
|
../hdd/bin/ld: ld.c
|
2012-01-26 03:07:42 +04:00
|
|
|
@${BEG} "CC" "$< [-fPIC]"
|
|
|
|
@${CC} ${CFLAGS} -s -fPIC -o $@ $< ${ERRORS}
|
|
|
|
@${END} "CC" "$< [-fPIC]"
|
2012-01-19 06:12:04 +04:00
|
|
|
|
2011-11-19 00:45:19 +04:00
|
|
|
../hdd/bin/%: %.c
|
2012-01-26 03:07:42 +04:00
|
|
|
@${BEG} "CC" "$<"
|
|
|
|
@${CC} ${CFLAGS} -s -o $@ $< ${ERRORS}
|
|
|
|
@${END} "CC" "$<"
|
|
|
|
|
2012-01-28 04:04:39 +04:00
|
|
|
%.o: %.c
|
|
|
|
@${BEG} "CC" "$< [lib]"
|
|
|
|
@${CC} ${CFLAGS} -c -s -o $@ $< ${ERRORS}
|
|
|
|
@${END} "CC" "$< [lib]"
|