diff options
author | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2021-08-19 01:42:49 +0300 |
---|---|---|
committer | Yaroslav de la Peña Smirnov <yps@yaroslavps.com> | 2021-08-19 01:42:49 +0300 |
commit | 6e20bab8f5fcfbe4fe816425704f9edd8ad88444 (patch) | |
tree | 5f11825e1afc4dbc75ed9778afcdd9e12cddcb05 /Makefile | |
parent | 5ed7b33fa8ce0c91af1a58bc17636d6bf0406d24 (diff) | |
download | parcini-6e20bab8f5fcfbe4fe816425704f9edd8ad88444.tar.gz parcini-6e20bab8f5fcfbe4fe816425704f9edd8ad88444.zip |
Example and new helper funcion
* Added an example program an ini file to example/
* Added a new helper function `parcini_value_handle` to handle and copy
parsed values, depending on the expected value type.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -12,16 +12,22 @@ BUILD_DIR:=build test: CFLAGS := -std=c99 -O0 -g -Wall -DDEBUG test: $(BUILD_DIR) tests/parcini -tests/%: $(OBJ_DIR)/src/tests/%.o $(OBJ_DIR)/src/%.o $(PARCINI_OBJECTS) +tests/%: $(OBJ_DIR)/src/tests/%.o $(PARCINI_OBJECTS) $(CC) $(LDFLAGS) -o $(BUILD_DIR)/$@ $^ $(BUILD_DIR)/$@ +example: CFLAGS := -std=c99 -O2 -Wall +example: $(OBJ_DIR)/example/example.o $(PARCINI_OBJECTS) + $(CC) $(LDFLAGS) -o $(BUILD_DIR)/example/$@ $^ + $(OBJ_DIR)/%.o: %.c $(CC) -c $(CFLAGS) $(INC_DIRS) -o $@ $< $(BUILD_DIR): mkdir -p $(BUILD_DIR)/tests + mkdir -p $(BUILD_DIR)/example mkdir -p $(OBJ_DIR)/src/tests + mkdir -p $(OBJ_DIR)/example clean: $(RM) $(OBJ_DIR) |