aboutsummaryrefslogtreecommitdiff
path: root/src/rules.make
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-02-14 19:15:43 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2015-02-14 19:15:43 +0100
commit1ca147f9e08202dfbc78692e204adac280f8238b (patch)
tree70cf40c14aae874bae814a9dcddbfdf5aba52079 /src/rules.make
parent74ea640f40285220dfa93492a143a35426b867d1 (diff)
downloadkogata-1ca147f9e08202dfbc78692e204adac280f8238b.tar.gz
kogata-1ca147f9e08202dfbc78692e204adac280f8238b.zip
Rearrange testing architecture : just type 'make run_tests'
Diffstat (limited to 'src/rules.make')
-rw-r--r--src/rules.make7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/rules.make b/src/rules.make
index 6c02313..9f4e8ce 100644
--- a/src/rules.make
+++ b/src/rules.make
@@ -12,11 +12,8 @@ LDFLAGS += -ffreestanding -O2 -nostdlib -lgcc
all: $(OUT)
-%.bin: $(OBJ)
- $(LD) $(LDFLAGS) -o $@ $^ $(LIB)
-
-%.lib: $(OBJ)
- $(LD) $(LDFLAGS) -r -o $@ $^ $(LIB)
+$(OUT): $(OBJ) $(LIB)
+ OUT=$(OUT); $(LD) $(LDFLAGS) `if [ $${OUT##*.} = lib ]; then echo -r; fi` -o $@ $^
%.o: %.s
$(AS) $(ASFLAGS) -o $@ $<