summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2010-08-10 17:14:38 +0200
committerAlexis211 <alexis211@gmail.com>2010-08-10 17:14:38 +0200
commit0ec0ca40a4fedfe97c49903a329b2a9ad2e22d03 (patch)
treeb9033e69392dd1a7ffe0173ef8db561ecce9b21b /src/modules
parentad27a90fa788a81253b5f2ad621d82ae574ae65d (diff)
downloadTCE-0ec0ca40a4fedfe97c49903a329b2a9ad2e22d03.tar.gz
TCE-0ec0ca40a4fedfe97c49903a329b2a9ad2e22d03.zip
Using a cross-compiler. Better makefile system.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/manager/Makefile34
-rw-r--r--src/modules/test/Makefile35
2 files changed, 10 insertions, 59 deletions
diff --git a/src/modules/manager/Makefile b/src/modules/manager/Makefile
index 87a9590..abce5cb 100644
--- a/src/modules/manager/Makefile
+++ b/src/modules/manager/Makefile
@@ -1,33 +1,9 @@
-.PHONY: clean, mrproper
+Obj = main.o
+Out = manager.elf
-CC = gcc
-CFLAGS = -nostdlib -nostartfiles -nodefaultlibs -fno-builtin -fno-stack-protector -Wall -Wextra -I ../../include
+include ../../common.make
-LD = ld
-LDFLAGS = -T ../../library/link.ld -L ../../library -Map manager.map
+CFLAGS += -I ../../include
-Objects = main.o
-Outfile = manager.elf
-
-all: $(Outfile)
- echo "* Done with $(Outfile)"
-
-rebuild: mrproper all
-
-$(Outfile): $(Objects)
- echo "* Linking $@..."
- $(LD) $(LDFLAGS) -o $@ $^
-
-%.o: %.c
- $(CC) $(CFLAGS) -c $< -o $@
-
-clean:
- echo "* Removing objects..."
- rm *.o || exit 0
- rm *.map || exit 0
- rm $(Objects) || exit 0
-
-mrproper: clean
- rm *.elf || exit 0
- rm $(Outfile) || exit 0
+LDFLAGS += -T ../../library/link.ld -L ../../library -Map manager.map
diff --git a/src/modules/test/Makefile b/src/modules/test/Makefile
index 6dd9f80..3b9ac14 100644
--- a/src/modules/test/Makefile
+++ b/src/modules/test/Makefile
@@ -1,33 +1,8 @@
-.PHONY: clean, mrproper
+Obj = main.o
+Out = test.elf
-CC = gcc
-CFLAGS = -nostdlib -nostartfiles -nodefaultlibs -fno-builtin -fno-stack-protector -Wall -Wextra -I ../../include
+include ../../common.make
-LD = ld
-LDFLAGS = -T ../../library/link.ld -L ../../library -Map test.map
-
-Objects = main.o
-Outfile = test.elf
-
-all: $(Outfile)
- echo "* Done with $(Outfile)"
-
-rebuild: mrproper all
-
-$(Outfile): $(Objects)
- echo "* Linking $@..."
- $(LD) $(LDFLAGS) -o $@ $^
-
-%.o: %.c
- $(CC) $(CFLAGS) -c $< -o $@
-
-clean:
- echo "* Removing objects..."
- rm *.o || exit 0
- rm *.map || exit 0
- rm $(Objects) || exit 0
-
-mrproper: clean
- rm *.elf || exit 0
- rm $(Outfile) || exit 0
+CFLAGS += -I ../../include
+LDFLAGS += -T ../../library/link.ld -L ../../library -Map test.map