Fix Makefile
parent
f70e3d949a
commit
bfaf0f0e02
12
Makefile
12
Makefile
|
@ -11,19 +11,19 @@ DEFLDFLAGS = $(shell if echo "" | cc -E -dM -xc - | grep __FreeBSD__ > /dev/null
|
||||||
|
|
||||||
all: $(OUT)
|
all: $(OUT)
|
||||||
|
|
||||||
obj:
|
$(OBJDIR):
|
||||||
mkdir obj
|
mkdir $(OBJDIR)
|
||||||
|
|
||||||
platform: obj
|
$(OBJDIR)/platform: $(OBJDIR)
|
||||||
mkdir obj/platform
|
mkdir $(OBJDIR)/platform
|
||||||
|
|
||||||
$(OBJDIR)/%.o: $(SRCDIR)/%.c
|
$(OBJDIR)/%.o: $(SRCDIR)/%.c
|
||||||
$(CC) -c -o $@ $< $(CFLAGS) $(INCLUDE)
|
$(CC) -c -o $@ $< $(CFLAGS) $(INCLUDE)
|
||||||
|
|
||||||
$(OUT): obj platform $(OBJ)
|
$(OUT): $(OBJDIR) $(OBJDIR)/platform $(OBJ)
|
||||||
$(CC) -o $@ $(OBJ) $(LDFLAGS) $(DEFLDFLAGS)
|
$(CC) -o $@ $(OBJ) $(LDFLAGS) $(DEFLDFLAGS)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
$(RM) -r $(OUT) $(OBJDIR)/*
|
$(RM) $(OUT) $(OBJDIR)/*.o $(OBJDIR)/platform/*.o
|
||||||
|
|
||||||
.PHONY: default clean
|
.PHONY: default clean
|
||||||
|
|
Loading…
Reference in New Issue