clean up makefile
This commit is contained in:
parent
d6b05cd7b7
commit
92a9fb163f
1 changed files with 7 additions and 7 deletions
14
Makefile
14
Makefile
|
@ -24,18 +24,18 @@ modules: dirs $(MOD:.c=.so)
|
|||
dirs:
|
||||
mkdir -p ./$(BIN)
|
||||
|
||||
run: all
|
||||
$(BIN)/$(PROGRAM)
|
||||
|
||||
$(PROGRAM): $(OBJ)
|
||||
$(PROGRAM): $(addprefix $(BIN)/, $(OBJ))
|
||||
$(CC) -o $(BIN)/$(PROGRAM) $^ $(LDFLAGS)
|
||||
|
||||
$(BIN)/%.o: %.c
|
||||
$(CC) -o $@ -c $< $(CFLAGS)
|
||||
%.o: %.c
|
||||
$(CC) -o $(BIN)/$@ -c $< $(CFLAGS)
|
||||
|
||||
%.so: modules/%.c
|
||||
$(CC) -o $(BIN)/$@ $^ -shared -fPIC $(CFLAGS)
|
||||
|
||||
clean:
|
||||
clean: clean_modules
|
||||
rm -rf $(OBJ)
|
||||
rm -rf $(PROGRAM)
|
||||
|
||||
clean_modules:
|
||||
rm -rf $(wildcard $(BIN)/*.so)
|
||||
|
|
Loading…
Reference in a new issue